mirror of
https://github.com/storytold/lightcraft.git
synced 2026-12-02 10:49:56 -06:00
profile.import (File > Import Profiles & Presets, drag & drop) now also reads DNG Camera Profiles: the user's own .dcp files, e.g. made with a colour-checker tool. They appear in the profile browser and menu under Camera Profiles with dcp:<camera>-<file> ids; profiles.camera lists them and profile.deleteCamera / profile.deleteImported remove them. A library on disk keeps a copy in Profiles/. No profile ships with the app and the repository holds none: tests build theirs in memory (write_dcp). lightcraft_raw::dcp parses the file per DNG spec ch. 6 (magic RC in place of 42; IFD 0 read through the existing DNG colour builders) and DcpProfile::applied_to puts its matrices, illuminants and look in place of a raw file's, keeping the shot's white balance, analog balance and baseline exposure. Choosing one (develop.profile) replaces the raw file's colour model when it is decoded, before the starting colour and the white-balance scale (WbScaleOf) are worked out, so the matrix path takes over from the fitted JPEG look (CR3/CR2/ARW...) and white balance follows the profile. A profile without a tone curve of its own (most chart-made ones) keeps the photo's contrast: the DNG's tone curve, else the tone of the camera-JPEG fit. The profile travels with SourceRef::File into FileLoader / PairLoader (new Option<&DcpProfile> argument); a decoded source records the profile it was made with and is not reused for another. Smart previews and the web render worker keep the file's own colour; rendered (non-raw) photos ignore it. This reverses the documented "Adobe profile formats deliberately unsupported" stance for user-supplied files only; docs updated. Split out of #1012. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>