Skip to content

Commit

Permalink
LibGfx/WebPWriter: Add debug logging for ANMF chunks
Browse files Browse the repository at this point in the history
  • Loading branch information
nico committed May 12, 2024
1 parent 2e3028b commit d42ff6e
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Userland/Libraries/LibGfx/ImageFormats/WebPWriter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -365,6 +365,9 @@ static ErrorOr<void> write_ANMF_chunk(Stream& stream, ANMFChunk const& chunk)
if (chunk.frame_x % 2 != 0 || chunk.frame_y % 2 != 0)
return Error::from_string_literal("WebP lossless animation frames must be at at even coordinates");

dbgln_if(WEBP_DEBUG, "writing ANMF frame_x {} frame_y {} frame_width {} frame_height {} frame_duration {} blending_method {} disposal_method {}",
chunk.frame_x, chunk.frame_y, chunk.frame_width, chunk.frame_height, chunk.frame_duration_in_milliseconds, (int)chunk.blending_method, (int)chunk.disposal_method);

TRY(write_chunk_header(stream, "ANMF"sv, 16 + chunk.frame_data.size()));

LittleEndianOutputBitStream bit_stream { MaybeOwned<Stream>(stream) };
Expand Down

0 comments on commit d42ff6e

Please sign in to comment.