/* * Copyright (c) 2023, Lucas Chollet * * SPDX-License-Identifier: BSD-2-Clause */ #pragma once #include #include namespace Gfx { struct JPEGEncoderOptions { Optional icc_data; u8 quality { 75 }; }; class JPEGWriter { public: using Options = JPEGEncoderOptions; static ErrorOr encode(Stream&, Bitmap const&, Options const& = {}); static ErrorOr encode(Stream&, CMYKBitmap const&, Options const& = {}); private: JPEGWriter() = delete; }; }