LibGfx: Allow ImageDecoders to expose their color space through CICP

This introduces a new API in ImageDecoderPlugins that allow an image
decoder to return a CICP struct. Also, we use this API in
ImageDecoder::color_space() to create a color space corresponding to
these CICP.
This commit is contained in:
Lucas CHOLLET 2025-02-08 00:07:28 -05:00 committed by Tim Flynn
commit cffc8678d8
Notes: github-actions[bot] 2025-02-12 17:26:15 +00:00
4 changed files with 36 additions and 0 deletions

View file

@ -10,6 +10,7 @@
#include <AK/Noncopyable.h>
#include <AK/NonnullOwnPtr.h>
#include <LibIPC/Forward.h>
#include <LibMedia/Color/CodingIndependentCodePoints.h>
namespace Gfx {
@ -28,6 +29,7 @@ public:
ColorSpace& operator=(ColorSpace&&);
~ColorSpace();
static ErrorOr<ColorSpace> from_cicp(Media::CodingIndependentCodePoints);
static ErrorOr<ColorSpace> load_from_icc_bytes(ReadonlyBytes);
// In order to keep this file free of Skia types, this function can't return