mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-29 12:49:05 +00:00
LibGfx/WebPWriter: Add a comment explaining a file offset
This commit is contained in:
parent
b8d18ebcf7
commit
c71b9fe6f8
Notes:
sideshowbarker
2024-07-17 09:47:09 +09:00
Author: https://github.com/nico
Commit: c71b9fe6f8
Pull-request: https://github.com/SerenityOS/serenity/pull/24468
Reviewed-by: https://github.com/AtkinsSJ
Reviewed-by: https://github.com/LucasChollet ✅
1 changed files with 6 additions and 0 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue