From 45e391dae964f4aa3ffc8d9709b46d1c456dd88f Mon Sep 17 00:00:00 2001 From: Nico Weber Date: Mon, 13 Feb 2023 19:48:51 -0500 Subject: [PATCH] LibGfx: Add v2 "ncol" tag, expand comment MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit I had missed this in 21cc0c0cb2f because this tag is missing in "Table 32 — Tag list" in the v2 ICC spec O_o. But it's in "6.4.26 namedColorTag". Also add a comment pointing to a page saying that all these tags are very deprecated and not even recommended for new v2 profiles. (That's how I noticed that namedColorTag was missing.) --- Userland/Libraries/LibGfx/ICC/Profile.cpp | 5 +++++ Userland/Libraries/LibGfx/ICC/Tags.h | 1 + 2 files changed, 6 insertions(+) diff --git a/Userland/Libraries/LibGfx/ICC/Profile.cpp b/Userland/Libraries/LibGfx/ICC/Profile.cpp index 92f964c121..b3aec99181 100644 --- a/Userland/Libraries/LibGfx/ICC/Profile.cpp +++ b/Userland/Libraries/LibGfx/ICC/Profile.cpp @@ -1294,6 +1294,8 @@ ErrorOr Profile::check_tag_types() // "Tag Type: deviceSettingsType" // - ICC v2, 6.4.24 mediaBlackPointTag // "Tag Type: XYZType" + // - ICC v2, 6.4.26 namedColorTag + // "Tag Type: namedColorType" // - ICC v2, 6.4.34 ps2CRD0Tag // "Tag Type: dataType" // - ICC v2, 6.4.35 ps2CRD1Tag @@ -1312,6 +1314,9 @@ ErrorOr Profile::check_tag_types() // "Tag Type: screeningType" // - ICC v2, 6.4.45 ucrbgTag // "Tag Type: ucrbgType" + // https://www.color.org/v2profiles.xalter says about these tags: + // "it is also recommended that optional tags in the v2 specification that have subsequently become + // obsolete are not included in future profiles made to the v2 specification." return {}; } diff --git a/Userland/Libraries/LibGfx/ICC/Tags.h b/Userland/Libraries/LibGfx/ICC/Tags.h index 6f95efdc4f..abefb64f0a 100644 --- a/Userland/Libraries/LibGfx/ICC/Tags.h +++ b/Userland/Libraries/LibGfx/ICC/Tags.h @@ -69,6 +69,7 @@ namespace Gfx::ICC { TAG(crdInfoTag, 0x63726469 /* 'crdi' */) \ TAG(deviceSettingsTag, 0x64657673 /* 'devs' */) \ TAG(mediaBlackPointTag, 0x626B7074 /* 'bkpt' */) \ + TAG(namedColorTag, 0x6E636F6C /* 'ncol' */) \ TAG(ps2CRD0Tag, 0x70736430 /* 'psd0' */) \ TAG(ps2CRD1Tag, 0x70736431 /* 'psd1' */) \ TAG(ps2CRD2Tag, 0x70736432 /* 'psd2' */) \