diff --git a/Userland/Libraries/LibGfx/ICC/BinaryFormat.h b/Userland/Libraries/LibGfx/ICC/BinaryFormat.h index c9952a4b62..83fc0a69b8 100644 --- a/Userland/Libraries/LibGfx/ICC/BinaryFormat.h +++ b/Userland/Libraries/LibGfx/ICC/BinaryFormat.h @@ -89,6 +89,14 @@ static_assert(AssertSize()); // "The profile file signature field shall contain the value “acsp” (61637370h) as a profile file signature." constexpr u32 ProfileFileSignature = 0x61637370; +// ICC V4, 7.3 Tag table, Table 24 - Tag table structure +struct TagTableEntry { + BigEndian tag_signature; + BigEndian offset_to_beginning_of_tag_data_element; + BigEndian size_of_tag_data_element; +}; +static_assert(AssertSize()); + // Common bits of ICC v4, Table 40 — lut16Type encoding and Table 44 — lut8Type encoding struct LUTHeader { u8 number_of_input_channels; diff --git a/Userland/Libraries/LibGfx/ICC/Profile.cpp b/Userland/Libraries/LibGfx/ICC/Profile.cpp index 39cc109710..6739d844a4 100644 --- a/Userland/Libraries/LibGfx/ICC/Profile.cpp +++ b/Userland/Libraries/LibGfx/ICC/Profile.cpp @@ -629,14 +629,6 @@ static ErrorOr>> read_tag_ta return Error::from_string_literal("ICC::Profile: Not enough data for tag count"); auto tag_count = *bit_cast const*>(tag_table_bytes.data()); - // ICC V4, 7.3 Tag table, Table 24 - Tag table structure - struct TagTableEntry { - BigEndian tag_signature; - BigEndian offset_to_beginning_of_tag_data_element; - BigEndian size_of_tag_data_element; - }; - static_assert(AssertSize()); - tag_table_bytes = tag_table_bytes.slice(sizeof(u32)); if (tag_table_bytes.size() < tag_count * sizeof(TagTableEntry)) return Error::from_string_literal("ICC::Profile: Not enough data for tag table entries");