mirror of
https://github.com/storytold/photocraft.git
synced 2026-10-27 03:17:05 -06:00
Opening any file Photoshop tagged with sRGB IEC61966-2.1 asked "Embedded Profile Mismatch: sRGB IEC61966-2.1 vs sRGB IEC61966-2.1": open_policy compared a hash of the ICC bytes, and Photoshop's v2 profile (1024-entry tables) and the built-in v4 sRGB (parametric curves) are the same colours in different bytes. 32-bit documents in Photoshop's linear sRGB missed the stay-linear exception for the same reason. Add Profile::same_colors: same colour space and every sample of a device grid within dE76 0.5 through both (re-encoding costs 0.025; moving the red primary 2% costs 1.0). Colours are compared rather than round-tripped because CMYK -> PCS -> CMYK is not an identity even for one profile. Of the 75 profile-tagged PSDs in the test corpora, all 75 prompted on open; now 6 do (Adobe RGB, Gray Gamma 2.2, SWOP), each a real mismatch. Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>