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

LibPDF: Sketch out Lab color space

Same as other recent color spaces: Enough to make us not assert,
but not enough to actually produce color.

Fixes 2 asserts on the `-n 500` 0000.zip pdfa dataset.
This commit is contained in:
Nico Weber 2023-10-24 11:13:04 -07:00 committed by Andreas Kling
parent 1a4df4ffe7
commit 2878af5968
3 changed files with 39 additions and 0 deletions

View file

@ -144,6 +144,21 @@ private:
NonnullRefPtr<Gfx::ICC::Profile> m_profile;
};
class LabColorSpace final : public ColorSpace {
public:
static PDFErrorOr<NonnullRefPtr<LabColorSpace>> create(Document*, Vector<Value>&& parameters);
~LabColorSpace() override = default;
PDFErrorOr<Color> color(ReadonlySpan<Value> arguments) const override;
int number_of_components() const override { return 3; }
Vector<float> default_decode() const override;
ColorSpaceFamily const& family() const override { return ColorSpaceFamily::Lab; }
private:
LabColorSpace() = default;
};
class SeparationColorSpace final : public ColorSpace {
public:
static PDFErrorOr<NonnullRefPtr<SeparationColorSpace>> create(Document*, Vector<Value>&& parameters);