mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 03:37:34 +00:00
LibGfx: Correctly handle more than one PrefixCodeGroup in webp decoder
The `static` here meant we always kept the alphabet sizes of the first image we happened to load -- and a single webp lossless image can store several helper images used during decoding. Usually, the helper images wouldn't use a color cache but the main image would, but the main image would then use the first entry from the helper images due to the `static`, which led us to not decoding the codes for the color cache symbols.
This commit is contained in:
parent
4d87072201
commit
ae1f7124ac
1 changed files with 1 additions and 1 deletions
|
@ -435,7 +435,7 @@ static ErrorOr<PrefixCodeGroup> decode_webp_chunk_VP8L_prefix_code_group(WebPLoa
|
|||
// * G channel: 256 + 24 + color_cache_size
|
||||
// * other literals (A,R,B): 256
|
||||
// * distance code: 40"
|
||||
static Array<size_t, 5> const alphabet_sizes { 256 + 24 + static_cast<size_t>(color_cache_size), 256, 256, 256, 40 };
|
||||
Array<size_t, 5> const alphabet_sizes { 256 + 24 + static_cast<size_t>(color_cache_size), 256, 256, 256, 40 };
|
||||
|
||||
PrefixCodeGroup group;
|
||||
for (size_t i = 0; i < alphabet_sizes.size(); ++i)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue