diff options
author | Nico Weber <thakis@chromium.org> | 2023-02-17 22:20:59 -0500 |
---|---|---|
committer | Sam Atkins <atkinssj@gmail.com> | 2023-02-19 08:12:04 +0000 |
commit | 933002ae5aa868ab1cfb422e7f6310a03408e346 (patch) | |
tree | b2d45fc5a3eb20c30c3e8aa06e08a3ff32d55721 /Userland | |
parent | 841e359341ceced7870d66c12586e434b48fee58 (diff) | |
download | serenity-933002ae5aa868ab1cfb422e7f6310a03408e346.zip |
LibGfx: Move ICC ViewingConditionsHeader to BinaryFormat.h
Diffstat (limited to 'Userland')
-rw-r--r-- | Userland/Libraries/LibGfx/ICC/BinaryFormat.h | 8 | ||||
-rw-r--r-- | Userland/Libraries/LibGfx/ICC/TagTypes.cpp | 8 |
2 files changed, 8 insertions, 8 deletions
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<MultiLocalizedUnicodeRawRecord, 12>()); +// 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<MeasurementTagData::StandardIlluminant> illuminant_type; +}; +static_assert(AssertSize<ViewingConditionsHeader, 28>()); + } 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<NonnullRefPtr<ViewingConditionsTagData>> 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<MeasurementTagData::StandardIlluminant> illuminant_type; - }; - static_assert(AssertSize<ViewingConditionsHeader, 28>()); - if (bytes.size() < 2 * sizeof(u32) + sizeof(ViewingConditionsHeader)) return Error::from_string_literal("ICC::Profile: viewingConditionsType has not enough data"); |