mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 03:27:34 +00:00
LibPDF: Add support for the CalRGB ColorSpace
This isn't tested all that well, as the PDF I am testing with only uses it for black (which is trivial). It can be tested further when LibPDF is able to process more complex PDFs that actually use this color space non-trivially.
This commit is contained in:
parent
7b4e36bf88
commit
006f5498de
3 changed files with 205 additions and 0 deletions
|
@ -69,4 +69,20 @@ private:
|
|||
DeviceCMYKColorSpace() = default;
|
||||
};
|
||||
|
||||
class CalRGBColorSpace final : public ColorSpace {
|
||||
public:
|
||||
static RefPtr<CalRGBColorSpace> create(RefPtr<Document>, Vector<Value>&& parameters);
|
||||
virtual ~CalRGBColorSpace() override = default;
|
||||
|
||||
virtual Color color(const Vector<Value>& arguments) const override;
|
||||
|
||||
private:
|
||||
CalRGBColorSpace() = default;
|
||||
|
||||
Array<float, 3> m_whitepoint { 0, 0, 0 };
|
||||
Array<float, 3> m_blackpoint { 0, 0, 0 };
|
||||
Array<float, 3> m_gamma { 1, 1, 1 };
|
||||
Array<float, 9> m_matrix { 1, 0, 0, 0, 1, 0, 0, 0, 1 };
|
||||
};
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue