diff --git a/Userland/Libraries/LibGfx/ImageFormats/ImageDecoder.h b/Userland/Libraries/LibGfx/ImageFormats/ImageDecoder.h index aadc4ef74e..92626d37c4 100644 --- a/Userland/Libraries/LibGfx/ImageFormats/ImageDecoder.h +++ b/Userland/Libraries/LibGfx/ImageFormats/ImageDecoder.h @@ -11,6 +11,7 @@ #include #include #include +#include #include #include @@ -30,6 +31,7 @@ struct VectorImageFrameDescriptor { enum class NaturalFrameFormat { RGB, + CMYK, Vector, }; @@ -59,6 +61,7 @@ public: virtual ErrorOr> icc_data() { return OptionalNone {}; } virtual NaturalFrameFormat natural_frame_format() const { return NaturalFrameFormat::RGB; } + virtual ErrorOr> cmyk_frame() { VERIFY_NOT_REACHED(); } virtual ErrorOr vector_frame(size_t) { VERIFY_NOT_REACHED(); } protected: @@ -82,6 +85,9 @@ public: NaturalFrameFormat natural_frame_format() { return m_plugin->natural_frame_format(); } + // Call only if natural_frame_format() == NaturalFrameFormat::CMYK. + ErrorOr> cmyk_frame(size_t) { return m_plugin->cmyk_frame(); } + // Call only if natural_frame_format() == NaturalFrameFormat::Vector. ErrorOr vector_frame(size_t index) { return m_plugin->vector_frame(index); }