Commit graph

4 commits

Author SHA1 Message Date
Nico Weber
c431cf4907 LibGfx: Add comparison operators to CMYK 2024-01-26 07:36:53 +01:00
Nico Weber
11b623b1fd LibGfx: Add data_size() accessors to Bitmap and CMYKBitmap
These return the size of the data in bytes.
2024-01-25 15:53:44 +01:00
Lucas CHOLLET
09b2b3539b LibGfx/JPEG+CMYKBitmap: Extract the CMYK to RGB conversion code
Right now, the JPEG decoder is the only one supporting CMYK, but that
won't last for long. So, let's move the conversion to CMYKBitmap.
2024-01-24 22:16:22 -07:00
Nico Weber
bc6eebb1d7 LibGfx: Add CMYKBitmap
This is a simple container for 2d CMYK data.

This is a new class instead of a new format in Bitmap because:
* Almost all clients of Bitmap will want to deal with RGB data
* It keeps the ARGB32 typedef working
* Bitmap already does a lot of things

The idea is that a few select places will be able to use
CMYKBitmap and a color profile to do a better CMYK -> RGB conversion
than an image decoder could do, and then store the result in a Bitmap
for later display then.

CMYKBitmap misses some of Bitmap's features, such as shared
memory support, high-dpi scaling capability, etc.
2024-01-10 09:39:00 +01:00