Summary: | Linear gamma ICC profiles return an "Undefined" transfer characteristic | ||
---|---|---|---|
Product: | [Applications] krita | Reporter: | amyspark <amy> |
Component: | Color models | Assignee: | Krita Bugs <krita-bugs-null> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | qampidh |
Priority: | NOR | Keywords: | triaged |
Version: | git master (please specify the git hash!) | ||
Target Milestone: | --- | ||
Platform: | Compiled Sources | ||
OS: | Microsoft Windows | ||
Latest Commit: | https://invent.kde.org/graphics/krita/commit/a8e7dc17424a62041f76a3833eedfe77f8848c44 | Version Fixed In: |
Description
amyspark
2022-09-14 17:16:01 UTC
I observed this as well, not only on linear, but on any profiles (be it sRGB, rec709, g22, etc). Always returned as TRC_UNDEFINED. The only one that returns a correct value is when Krita creating a synthetic profile (that has a name "Krita [primaries] [trc]"). Noticed this while working on jxl impex. It seems deep in the color registry that transfer characteristics is not set? Correct, the synthetic profiles are build per-piece (and so the code had access to the transfer curve's characteristics). The ICC ones are treated as binary blobs, and we never tried to actually parse them... Also see https://invent.kde.org/graphics/krita/-/commit/f2335c36dc85621e0284ecf688621a66f55e67b2 for the 5.1 cherry-pick. (In reply to amyspark from comment #3) > Also see > https://invent.kde.org/graphics/krita/-/commit/ > f2335c36dc85621e0284ecf688621a66f55e67b2 for the 5.1 cherry-pick. Ah yes that was me. Sorry I used different name and email, idk why I can't log with same gmail here >< probably had to do with old krita/kde forum..? Anyway I digress, that MR didn't fix the TRC though.. only the rgb primaries and whitepoint. TRC parsing is a bit tricky for non-gamma values.. (or complex parametric curve like ICC v4 did). Oh, apologies, reopening then. Git commit cf28aa85149ff5f8a07ae7ea3587fd4137bdfa58 by L. E. Segovia, on behalf of Rasyuqa A. H. Committed on 05/12/2022 at 14:06. Pushed by merge-service into branch 'master'. Parse transfer characteristics from ICC profiles Part-of: <https://invent.kde.org/graphics/krita/-/merge_requests/1667> M +50 -0 libs/pigment/KoColorProfile.cpp M +6 -0 libs/pigment/KoColorProfile.h M +2 -1 libs/pigment/KoColorProfileConstants.h M +5 -0 libs/pigment/colorprofiles/KoDummyColorProfile.cpp M +1 -0 libs/pigment/colorprofiles/KoDummyColorProfile.h M +8 -0 plugins/color/lcms2engine/colorprofiles/IccColorProfile.cpp M +2 -0 plugins/color/lcms2engine/colorprofiles/IccColorProfile.h M +40 -4 plugins/color/lcms2engine/colorprofiles/LcmsColorProfileContainer.cpp M +2 -0 plugins/color/lcms2engine/colorprofiles/LcmsColorProfileContainer.h https://invent.kde.org/graphics/krita/commit/cf28aa85149ff5f8a07ae7ea3587fd4137bdfa58 Git commit a8e7dc17424a62041f76a3833eedfe77f8848c44 by L. E. Segovia, on behalf of Rasyuqa A. H. Committed on 05/12/2022 at 14:11. Pushed by lsegovia into branch 'krita/5.1'. Parse transfer characteristics from ICC profiles Part-of: <https://invent.kde.org/graphics/krita/-/merge_requests/1667> (cherry picked from commit cf28aa85149ff5f8a07ae7ea3587fd4137bdfa58) M +50 -0 libs/pigment/KoColorProfile.cpp M +6 -0 libs/pigment/KoColorProfile.h M +2 -1 libs/pigment/KoColorProfileConstants.h M +5 -0 libs/pigment/colorprofiles/KoDummyColorProfile.cpp M +1 -0 libs/pigment/colorprofiles/KoDummyColorProfile.h M +8 -0 plugins/color/lcms2engine/colorprofiles/IccColorProfile.cpp M +2 -0 plugins/color/lcms2engine/colorprofiles/IccColorProfile.h M +40 -4 plugins/color/lcms2engine/colorprofiles/LcmsColorProfileContainer.cpp M +2 -0 plugins/color/lcms2engine/colorprofiles/LcmsColorProfileContainer.h https://invent.kde.org/graphics/krita/commit/a8e7dc17424a62041f76a3833eedfe77f8848c44 |