/* * Copyright (c) 2024, Nico Weber * * SPDX-License-Identifier: BSD-2-Clause */ #pragma once #include #include #include #include namespace Gfx { class AnimationWriter; struct WebPEncoderOptions { VP8LEncoderOptions vp8l_options; Optional icc_data; }; class WebPWriter { public: using Options = WebPEncoderOptions; // Always lossless at the moment. static ErrorOr encode(Stream&, Bitmap const&, Options const& = {}); // Always lossless at the moment. static ErrorOr> start_encoding_animation(SeekableStream&, IntSize dimensions, int loop_count = 0, Color background_color = Color::Black, Options const& = {}); private: WebPWriter() = delete; }; }