mirror of
https://github.com/storytold/photocraft.git
synced 2026-10-26 02:47:07 -06:00
A DeviceLink's header PCS field holds its output colour space (ICC.1:2010 §7.2.7), so a CMYK→CMYK link has a 4→4 AToB0. The LUT channel check hard-coded 3 outputs and rejected such files as invalid, so users were told a well-formed profile was corrupt and never reached the "DeviceLink profiles cannot be used" error. Check DeviceLink LUTs against the header's output space instead, and only let a Lab DeviceLink through link_stages when its tables end in 3 channels, so a Lab→CMYK link gets the unsupported error rather than building a mismatched transform. Fixes #2337 Claude-Session: https://claude.ai/code/session_01X5k8jSoLtGswanmHBipHER Co-authored-by: Leel Wasanatha <260480244+kavishkashehan726-sudo@users.noreply.github.com> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>