1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-24 12:57:35 +00:00

LibGfx/WebP: Move lossless decoder to its own file

Pure code move (except of removing `static` on the two public functions
in the new header), not behavior change.
This commit is contained in:
Nico Weber 2023-05-07 11:28:59 -04:00 committed by Andreas Kling
parent 4f1c9a4ba2
commit 65c7145e69
4 changed files with 1033 additions and 999 deletions

View file

@ -48,6 +48,7 @@ set(SOURCES
ImageFormats/QOIWriter.cpp ImageFormats/QOIWriter.cpp
ImageFormats/TGALoader.cpp ImageFormats/TGALoader.cpp
ImageFormats/WebPLoader.cpp ImageFormats/WebPLoader.cpp
ImageFormats/WebPLoaderLossless.cpp
Painter.cpp Painter.cpp
Palette.cpp Palette.cpp
Path.cpp Path.cpp

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,25 @@
/*
* Copyright (c) 2023, Nico Weber <thakis@chromium.org>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#pragma once
#include <AK/Span.h>
#include <AK/Types.h>
#include <LibGfx/Bitmap.h>
namespace Gfx {
struct VP8LHeader {
u16 width;
u16 height;
bool is_alpha_used;
ReadonlyBytes lossless_data;
};
ErrorOr<VP8LHeader> decode_webp_chunk_VP8L_header(ReadonlyBytes vp8l_data);
ErrorOr<NonnullRefPtr<Bitmap>> decode_webp_chunk_VP8L_contents(VP8LHeader const& vp8l_header);
}