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

LibGfx/JPEG: Make it possible to obtain raw CMYK data from JPEGs

frame() still returns a regular RGB Bitmap (now lazily converted
from internal CMYK data), but JPEGImageDecoderPlugin now also
implements cmyk_frame().
This commit is contained in:
Nico Weber 2024-01-07 21:49:03 -05:00 committed by Andreas Kling
parent 51d5397e92
commit 239da5132d
2 changed files with 75 additions and 39 deletions

View file

@ -39,6 +39,9 @@ public:
virtual ErrorOr<ImageFrameDescriptor> frame(size_t index, Optional<IntSize> ideal_size = {}) override;
virtual ErrorOr<Optional<ReadonlyBytes>> icc_data() override;
virtual NaturalFrameFormat natural_frame_format() const override;
virtual ErrorOr<NonnullRefPtr<CMYKBitmap>> cmyk_frame() override;
private:
JPEGImageDecoderPlugin(NonnullOwnPtr<JPEGLoadingContext>);