Skip to content

Smart previews don't record the selected profile's missing tone curve, so V18's default curve is lost offline #5064

Backlog

Description

@smi-leonivkovic

Problem

From process V18 (#4099), a raw whose selected camera profile has no tone curve of its own (a DCP without ProfileToneCurve, such as Adobe Standard) renders on Lightroom's fitted default base curve. files/load.rs marks this as SourceInfo::default_tone, but only when the DCP is loaded with the raw.

Smart previews are built from the original without the DCP, on purpose: they keep the original camera colour (cmd/previews.rs, smart previews keep the original camera colour). So default_tone is None in every smart preview.

Result: offline, such a photo renders on its stored camera tone. Online, it renders on the default curve. Same edit, two looks.

docs/default-tone.md lists this as a limit. #1534 fixed the other source facts previews dropped. This one came after it.

Proposal

Record the fact, not the colour. When a smart preview is built, look up the photo's selected profile and store default_tone (the camera's exposure offset, or none) in the preview's facts. The pixels stay as they are.

Test

A raw with a no-tone-curve DCP selected: render online, build its smart preview, take the original offline, render again. Same base tone both times.

Found in CodeRabbit's review of #4099 and #4103.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions