1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 21:27:45 +00:00

LibGfx/ICC: Add a convert_cmyk_image() method

It converts from a CMYKBitmap to an (rgb) bitmap, using a real
color profile.

The API design here isn't super scalable (what if we want to also
handle grayscale inputs? What if we also want to convert _to_ cmyk
or grayscale?), but we have to start somewhere. Uses of this can
inform future API improvements.
This commit is contained in:
Nico Weber 2024-01-24 11:44:09 -05:00 committed by Andreas Kling
parent 11b623b1fd
commit 88b49a639e
2 changed files with 27 additions and 0 deletions

View file

@ -275,6 +275,7 @@ public:
ErrorOr<CIELAB> to_lab(ReadonlyBytes) const;
ErrorOr<void> convert_image(Bitmap&, Profile const& source_profile) const;
ErrorOr<void> convert_cmyk_image(Bitmap&, CMYKBitmap const&, Profile const& source_profile) const;
// Only call these if you know that this is an RGB matrix-based profile.
XYZ const& red_matrix_column() const;