/* * Copyright (c) 2024, Andreas Kling * * SPDX-License-Identifier: BSD-2-Clause */ #pragma once #include #include #include #include namespace Gfx { // This is not a nested struct to work around https://llvm.org/PR36684 struct PNGWriterOptions { // Data for the iCCP chunk. // FIXME: Allow writing cICP, sRGB, or gAMA instead too. Optional icc_data; }; class PNGWriter { public: using Options = PNGWriterOptions; static ErrorOr encode(Gfx::Bitmap const&, Options options = Options {}); private: PNGWriter() = default; }; }