Skip to content

Commit

Permalink
LibGfx/WebPWriter: Write correct alpha use hint in animation VP8L header
Browse files Browse the repository at this point in the history
Since we now compute this for free, might as well fill it in.

As far as I can tell, no observable behavior difference anywhere.
  • Loading branch information
nico committed May 28, 2024
1 parent a43b79f commit ab63d54
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Userland/Libraries/LibGfx/ImageFormats/WebPWriter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,8 @@ ErrorOr<void> WebPAnimationWriter::add_frame(Bitmap& bitmap, int duration_ms, In
chunk.disposal_method = ANMFChunkHeader::DisposalMethod::DoNotDispose;

TRY(write_ANMF_chunk_header(m_stream, chunk, compute_VP8L_chunk_size(vp8l_data_bytes)));
TRY(write_VP8L_chunk(m_stream, bitmap.width(), bitmap.height(), true, vp8l_data_bytes));
bool alpha_is_used_hint = !is_fully_opaque;
TRY(write_VP8L_chunk(m_stream, bitmap.width(), bitmap.height(), alpha_is_used_hint, vp8l_data_bytes));

TRY(update_size_in_header());

Expand Down

0 comments on commit ab63d54

Please sign in to comment.