/* * Copyright (c) 2023, Nico Weber * * SPDX-License-Identifier: BSD-2-Clause */ #pragma once #include #include #include namespace Gfx { struct VP8Header { u8 version; bool show_frame; u32 size_of_first_partition; u32 width; u8 horizontal_scale; u32 height; u8 vertical_scale; ReadonlyBytes first_partition; ReadonlyBytes second_partition; }; // Parses the header data in a VP8 chunk. Pass the payload of a `VP8 ` chunk, after the tag and after the tag's data size. ErrorOr decode_webp_chunk_VP8_header(ReadonlyBytes vp8_data); ErrorOr> decode_webp_chunk_VP8_contents(VP8Header const&, bool include_alpha_channel); }