1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-28 01:55:09 +00:00
serenity/Userland/Libraries/LibGfx/ImageFormats/JPEGWriter.h
Lucas CHOLLET 226b214142 LibGfx/JPEG: Add a JPEG encoder :^)
This encoder is very naive as it only output SOF0 images and uses
pre-defined Huffman tables.

There is also a small bug with quantization which make using it
over-degrade the quality.
2023-06-22 21:13:04 +02:00

22 lines
329 B
C++

/*
* Copyright (c) 2023, Lucas Chollet <lucas.chollet@serenityos.org>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#pragma once
#include <AK/Error.h>
#include <LibGfx/Forward.h>
namespace Gfx {
class JPEGWriter {
public:
static ErrorOr<void> encode(Stream&, Bitmap const&);
private:
JPEGWriter() = delete;
};
}