From d42ff6e18ab73a55fd3c7bf8eada51b90a210f45 Mon Sep 17 00:00:00 2001 From: Nico Weber Date: Sat, 11 May 2024 20:38:34 -0400 Subject: [PATCH] LibGfx/WebPWriter: Add debug logging for ANMF chunks --- Userland/Libraries/LibGfx/ImageFormats/WebPWriter.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Userland/Libraries/LibGfx/ImageFormats/WebPWriter.cpp b/Userland/Libraries/LibGfx/ImageFormats/WebPWriter.cpp index 7d42b7219ce090e..28430792a31273a 100644 --- a/Userland/Libraries/LibGfx/ImageFormats/WebPWriter.cpp +++ b/Userland/Libraries/LibGfx/ImageFormats/WebPWriter.cpp @@ -365,6 +365,9 @@ static ErrorOr 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) };