mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-01 21:59:07 +00:00
LibGfx: Add some support for decoding lossless webp files
Missing: * Transform support (used by virtually all lossless webp files) * Meta prefix / entropy image support Working: * Decoding of regular image streams * Color cache This happens to be enough to be able to decode Tests/LibGfx/test-inputs/extended-lossless.webp The canonical prefix code is very similar to deflate's, enough so that this can use Compress::CanonicalCode (and take advantage of all the recent performance improvements there).
This commit is contained in:
parent
c24e4acd19
commit
c84968dafd
Notes:
sideshowbarker
2024-07-17 03:30:41 +09:00
Author: https://github.com/nico
Commit: c84968dafd
Pull-request: https://github.com/SerenityOS/serenity/pull/18171
Reviewed-by: https://github.com/LucasChollet
Reviewed-by: https://github.com/gmta
2 changed files with 360 additions and 1 deletions
|
@ -430,7 +430,6 @@ ErrorOr<void> DeflateDecompressor::decode_codes(CanonicalCode& literal_code, Opt
|
|||
auto const code_length_code = TRY(CanonicalCode::from_bytes({ code_lengths_code_lengths, sizeof(code_lengths_code_lengths) }));
|
||||
|
||||
// Next we extract the code lengths of the code that was used to encode the block.
|
||||
|
||||
Vector<u8, 286> code_lengths;
|
||||
while (code_lengths.size() < literal_code_count + distance_code_count) {
|
||||
auto symbol = TRY(code_length_code.read_symbol(*m_input_stream));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue