mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 12:37:44 +00:00
ICC: Mark Profile::to_pcs() and to_lab() const
This commit is contained in:
parent
cd81b3e2fa
commit
8ab6e0d3a5
2 changed files with 4 additions and 4 deletions
|
@ -1373,7 +1373,7 @@ static TagSignature tag_for_rendering_intent(RenderingIntent rendering_intent)
|
||||||
VERIFY_NOT_REACHED();
|
VERIFY_NOT_REACHED();
|
||||||
}
|
}
|
||||||
|
|
||||||
ErrorOr<FloatVector3> Profile::to_pcs(ReadonlyBytes color)
|
ErrorOr<FloatVector3> Profile::to_pcs(ReadonlyBytes color) const
|
||||||
{
|
{
|
||||||
if (color.size() != number_of_components_in_color_space(data_color_space()))
|
if (color.size() != number_of_components_in_color_space(data_color_space()))
|
||||||
return Error::from_string_literal("ICC::Profile: input color doesn't match color space size");
|
return Error::from_string_literal("ICC::Profile: input color doesn't match color space size");
|
||||||
|
@ -1471,7 +1471,7 @@ ErrorOr<FloatVector3> Profile::to_pcs(ReadonlyBytes color)
|
||||||
VERIFY_NOT_REACHED();
|
VERIFY_NOT_REACHED();
|
||||||
}
|
}
|
||||||
|
|
||||||
ErrorOr<CIELAB> Profile::to_lab(ReadonlyBytes color)
|
ErrorOr<CIELAB> Profile::to_lab(ReadonlyBytes color) const
|
||||||
{
|
{
|
||||||
auto pcs = TRY(to_pcs(color));
|
auto pcs = TRY(to_pcs(color));
|
||||||
if (connection_space() == ColorSpace::PCSLAB)
|
if (connection_space() == ColorSpace::PCSLAB)
|
||||||
|
|
|
@ -265,9 +265,9 @@ public:
|
||||||
// The color's number of channels must match number_of_components_in_color_space(data_color_space()).
|
// The color's number of channels must match number_of_components_in_color_space(data_color_space()).
|
||||||
// Do not call for DeviceLink or NamedColor profiles. (XXX others?)
|
// Do not call for DeviceLink or NamedColor profiles. (XXX others?)
|
||||||
// Call connection_space() to find out the space the result is in.
|
// Call connection_space() to find out the space the result is in.
|
||||||
ErrorOr<FloatVector3> to_pcs(ReadonlyBytes);
|
ErrorOr<FloatVector3> to_pcs(ReadonlyBytes) const;
|
||||||
|
|
||||||
ErrorOr<CIELAB> to_lab(ReadonlyBytes);
|
ErrorOr<CIELAB> to_lab(ReadonlyBytes) const;
|
||||||
|
|
||||||
// Only call these if you know that this is an RGB matrix-based profile.
|
// Only call these if you know that this is an RGB matrix-based profile.
|
||||||
XYZ const& red_matrix_column() const;
|
XYZ const& red_matrix_column() const;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue