Repository navigation
LR-BEHAV-RENDER-FIDELITY: process V18, Lightroom's default base curve for camera profiles without one (#523) #4099
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from 92 commits
6d29e03
1835f3a
65bbb4c
b16fd0c
3fd3930
a8280a6
2f93829
4fd64f8
969ab28
6cb4e5b
9188e4d
815ebe6
95b9016
c067d02
8e4cc71
7689bf4
7b71468
0793d08
fc55dde
92f35bb
c7c5ee2
9815bad
7196856
5154467
93c9132
e43cb44
dfede7b
23d5484
30c8319
b40d6aa
7d20abd
1d03da3
c58e425
b1f6a66
0bbd0fc
e0193c8
b0e9b29
568e53d
b94de27
6f565fe
a8b4d7e
00405c3
2a379ff
ff287d9
0b26397
8bec5c5
3437e59
099c0f9
c51da98
a1f5477
5ba1722
14909c4
f54fd34
03de271
789c1a0
d1ce3c8
c9dfb53
3cabaf9
13fac86
18409da
fde6f70
18020ec
0fd6668
cd6195b
cfc8c22
0f6b536
7c0e8ea
be29de8
5ae163c
c1d63a2
880c540
8495512
1f53475
4f01fd1
19cfa00
9f2b85c
ff7529a
a85845d
2722f97
5a58233
de0c5a8
ee3071e
72cd3a9
87df28f
023c93c
e246094
5fcf5c9
c08c72d
a8872ab
fbf3704
ff2898d
642aab4
587ed53
6f70731
3c308bf
9917c4a
e382eef
fb876b1
c77c56e
7774be7
a596e99
9e53523
e2ee85b
6c5e27c
3dd5b0c
8390e40
cfc86f9
023aac3
ad09312
7630c81
ec8594d
4654ec9
0781fc8
c08a285
441131f
29133dc
b939b08
ceca982
8abe9bd
e0ce2e7
a2f2a8d
9e34e5b
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -70,6 +70,29 @@ fn a_profile_without_a_tone_curve_keeps_the_photos_contrast() { | |
| assert!((tone.apply(0.18) - 0.45).abs() < 0.01, "{}", tone.apply(0.18)); | ||
| } | ||
|
|
||
| /// Process V18 (`lightcraft_pipeline::default_tone`): a profile without a tone curve marks the source for the fitted | ||
| /// default curve (a camera with no measured offset: 0 stops); a profile with a curve, or no profile, does not. Up to | ||
| /// V7 the base tone stays the file's own. | ||
| #[test] | ||
| fn a_profile_without_a_tone_curve_gets_the_default_curve_from_v9() { | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Nit: this test is named
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
| use lightcraft_develop::{DevelopSettings, Process}; | ||
| use lightcraft_raw::profile::ToneCurve; | ||
| let dng = crate::tests_xmp::synthetic_dng_with(None, Default::default()); | ||
| let (_, plain) = crate::files::load_bytes(&dng, 64).unwrap(); | ||
| assert_eq!(plain.default_tone, None); | ||
| let (_, info) = crate::files::load_bytes_with(&dng, 64, Some(&swapping_profile("Swap"))).unwrap(); | ||
| assert_eq!(info.default_tone, Some(0.0)); | ||
| let mut curved = swapping_profile("Curved"); | ||
| curved.color.profile.tone_curve = ToneCurve::from_tag(&[0.0, 0.0, 0.18, 0.45, 1.0, 1.0]); | ||
| assert_eq!(crate::files::load_bytes_with(&dng, 64, Some(&curved)).unwrap().1.default_tone, None); | ||
| let on = |p: Process| DevelopSettings { process: p.version(), ..Default::default() }; | ||
| let (v7, v17) = | ||
| (lightcraft_pipeline::finish::base_tone(&on(Process::V7), &info, 1.0), lightcraft_pipeline::finish::base_tone(&on(Process::V18), &info, 1.0)); | ||
| let lr = lightcraft_pipeline::default_tone::curve(0.0).unwrap(); | ||
| assert!((v17.apply(0.18) - lr.apply(0.18)).abs() < 0.01, "{} vs {}", v17.apply(0.18), lr.apply(0.18)); | ||
| assert!((v7.apply(0.18) - lr.apply(0.18)).abs() > 0.01, "V7 keeps the file's own tone: {}", v7.apply(0.18)); | ||
| } | ||
|
|
||
| #[test] | ||
| fn import_choose_cache_persist_and_delete() { | ||
| let dir = temp_dir("session"); | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Smart previews are encoded without the DCP, so this field is always
Noneand an offline V18 photo whose profile has no tone curve renders on its stored camera tone instead of the default curve: same edit, two looks. Tracked in #5064 — worth linking from the PR description as a known limit.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Linked #5064 under Limits in the description.