mirror of
https://github.com/RGBCube/serenity
synced 2025-07-24 13:17:43 +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:
parent
4f1c9a4ba2
commit
65c7145e69
4 changed files with 1033 additions and 999 deletions
|
@ -48,6 +48,7 @@ set(SOURCES
|
|||
ImageFormats/QOIWriter.cpp
|
||||
ImageFormats/TGALoader.cpp
|
||||
ImageFormats/WebPLoader.cpp
|
||||
ImageFormats/WebPLoaderLossless.cpp
|
||||
Painter.cpp
|
||||
Palette.cpp
|
||||
Path.cpp
|
||||
|
|
File diff suppressed because it is too large
Load diff
1006
Userland/Libraries/LibGfx/ImageFormats/WebPLoaderLossless.cpp
Normal file
1006
Userland/Libraries/LibGfx/ImageFormats/WebPLoaderLossless.cpp
Normal file
File diff suppressed because it is too large
Load diff
25
Userland/Libraries/LibGfx/ImageFormats/WebPLoaderLossless.h
Normal file
25
Userland/Libraries/LibGfx/ImageFormats/WebPLoaderLossless.h
Normal 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);
|
||||
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue