diff --git a/Userland/Libraries/LibGfx/ICC/BinaryFormat.h b/Userland/Libraries/LibGfx/ICC/BinaryFormat.h index f78525412f..15fd82256e 100644 --- a/Userland/Libraries/LibGfx/ICC/BinaryFormat.h +++ b/Userland/Libraries/LibGfx/ICC/BinaryFormat.h @@ -149,4 +149,12 @@ struct MultiLocalizedUnicodeRawRecord { }; static_assert(AssertSize()); +// Table 84 — viewingConditionsType encoding +struct ViewingConditionsHeader { + XYZNumber unnormalized_ciexyz_values_for_illuminant; // "(in which Y is in cd/m2)" + XYZNumber unnormalized_ciexyz_values_for_surround; // "(in which Y is in cd/m2)" + BigEndian illuminant_type; +}; +static_assert(AssertSize()); + } diff --git a/Userland/Libraries/LibGfx/ICC/TagTypes.cpp b/Userland/Libraries/LibGfx/ICC/TagTypes.cpp index f8fb83dc6e..c777e3166a 100644 --- a/Userland/Libraries/LibGfx/ICC/TagTypes.cpp +++ b/Userland/Libraries/LibGfx/ICC/TagTypes.cpp @@ -1175,14 +1175,6 @@ ErrorOr> ViewingConditionsTagData::from_ VERIFY(tag_type(bytes) == Type); TRY(check_reserved(bytes)); - // Table 84 — viewingConditionsType encoding - struct ViewingConditionsHeader { - XYZNumber unnormalized_ciexyz_values_for_illuminant; // "(in which Y is in cd/m2)" - XYZNumber unnormalized_ciexyz_values_for_surround; // "(in which Y is in cd/m2)" - BigEndian illuminant_type; - }; - static_assert(AssertSize()); - if (bytes.size() < 2 * sizeof(u32) + sizeof(ViewingConditionsHeader)) return Error::from_string_literal("ICC::Profile: viewingConditionsType has not enough data");