mirror of
https://github.com/SerenityOS/serenity
synced 2024-07-21 10:05:32 +00:00
LibGfx/WebPWriter: Add a comment explaining a file offset
This commit is contained in:
parent
b8d18ebcf7
commit
c71b9fe6f8
|
@ -352,6 +352,12 @@ ErrorOr<void> WebPAnimationWriter::set_alpha_bit_in_header()
|
|||
m_vp8x_flags |= 0x10;
|
||||
|
||||
auto current_offset = TRY(m_stream.tell());
|
||||
// 4 bytes for "RIFF",
|
||||
// 4 bytes RIFF chunk size (i.e. file size - 8),
|
||||
// 4 bytes for "WEBP",
|
||||
// 4 bytes for "VP8X",
|
||||
// 4 bytes for VP8X chunk size,
|
||||
// followed by VP8X flags in the first byte of the VP8X chunk data.
|
||||
TRY(m_stream.seek(20, SeekMode::SetPosition));
|
||||
TRY(m_stream.write_value<u8>(m_vp8x_flags));
|
||||
TRY(m_stream.seek(current_offset, SeekMode::SetPosition));
|
||||
|
|
Loading…
Reference in a new issue