ladybird/Userland/Libraries/LibGfx/ImageFormats/WebPLoaderLossless.h
Nico Weber 119ccfe5da LibGfx/WebP: Minor cosmetical changes in WebPLoaderLossless.h
Add a comment, remove a parameter name that doesn't add anything,
and remove a weird newline in WebPLoader.cpp too.

No behavior change.
2023-05-09 06:35:56 +02:00

27 lines
609 B
C++

/*
* 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;
};
// Parses the header data in a VP8L chunk. Pass the payload of a `VP8L` chunk, after the tag and after the tag's data size.
ErrorOr<VP8LHeader> decode_webp_chunk_VP8L_header(ReadonlyBytes vp8l_data);
ErrorOr<NonnullRefPtr<Bitmap>> decode_webp_chunk_VP8L_contents(VP8LHeader const&);
}