mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 09:17:35 +00:00
LibGfx+image: Implement writing ICC profiles to jpeg files
This commit is contained in:
parent
83ab9f7c2d
commit
db4982bd29
3 changed files with 44 additions and 1 deletions
|
@ -133,7 +133,7 @@ static ErrorOr<void> save_image(LoadedImage& image, StringView out_path, bool pp
|
|||
auto buffered_stream = TRY(Core::OutputBufferedFile::create(move(output_stream)));
|
||||
|
||||
if (out_path.ends_with(".jpg"sv, CaseSensitivity::CaseInsensitive) || out_path.ends_with(".jpeg"sv, CaseSensitivity::CaseInsensitive)) {
|
||||
TRY(Gfx::JPEGWriter::encode(*buffered_stream, *frame, { .quality = jpeg_quality }));
|
||||
TRY(Gfx::JPEGWriter::encode(*buffered_stream, *frame, { .icc_data = image.icc_data, .quality = jpeg_quality }));
|
||||
return {};
|
||||
}
|
||||
if (out_path.ends_with(".ppm"sv, CaseSensitivity::CaseInsensitive)) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue