diff options
author | Nico Weber <thakis@chromium.org> | 2023-02-18 21:19:42 -0500 |
---|---|---|
committer | Jelle Raaijmakers <jelle@gmta.nl> | 2023-02-19 22:31:41 +0100 |
commit | 4d972ab97527ba107729c52b3cb303ed4bc3061e (patch) | |
tree | a94ae476c6ee0ce5019252ad63b26f8da55d586e | |
parent | 30ec59f1632d29eb512357f1d9aed260e04b598a (diff) | |
download | serenity-4d972ab97527ba107729c52b3cb303ed4bc3061e.zip |
LibGfx: Add spec comment to ICC encode_tag_table()
-rw-r--r-- | Userland/Libraries/LibGfx/ICC/BinaryWriter.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Userland/Libraries/LibGfx/ICC/BinaryWriter.cpp b/Userland/Libraries/LibGfx/ICC/BinaryWriter.cpp index df861cbdb5..6b43ce2a87 100644 --- a/Userland/Libraries/LibGfx/ICC/BinaryWriter.cpp +++ b/Userland/Libraries/LibGfx/ICC/BinaryWriter.cpp @@ -256,6 +256,8 @@ static ErrorOr<Vector<ByteBuffer>> encode_tag_datas(Profile const& profile, Hash static ErrorOr<void> encode_tag_table(ByteBuffer& bytes, Profile const& profile, Vector<size_t> const& offsets, Vector<ByteBuffer> const& tag_data_bytes, HashMap<TagData*, size_t> const& tag_data_map) { + // ICC v4, 7.3 Tag table + // ICC v4, 7.3.1 Overview VERIFY(bytes.size() >= sizeof(ICCHeader) + sizeof(u32) + profile.tag_count() * sizeof(TagTableEntry)); *bit_cast<BigEndian<u32>*>(bytes.data() + sizeof(ICCHeader)) = profile.tag_count(); |