diff --git a/Userland/Libraries/LibGfx/ICC/TagTypes.cpp b/Userland/Libraries/LibGfx/ICC/TagTypes.cpp index 8bdc4cf658b..fa587c4ed38 100644 --- a/Userland/Libraries/LibGfx/ICC/TagTypes.cpp +++ b/Userland/Libraries/LibGfx/ICC/TagTypes.cpp @@ -776,7 +776,7 @@ ErrorOr> NamedColor2TagData::from_bytes(Readon move(prefix), move(suffix), move(root_names), move(pcs_coordinates), move(device_coordinates)); } -ErrorOr NamedColor2TagData::color_name(u32 index) +ErrorOr NamedColor2TagData::color_name(u32 index) const { StringBuilder builder; builder.append(prefix()); diff --git a/Userland/Libraries/LibGfx/ICC/TagTypes.h b/Userland/Libraries/LibGfx/ICC/TagTypes.h index 9599c80d9c0..7ee61495924 100644 --- a/Userland/Libraries/LibGfx/ICC/TagTypes.h +++ b/Userland/Libraries/LibGfx/ICC/TagTypes.h @@ -545,7 +545,7 @@ public: // "If this field is 0, device coordinates are not provided." u32 number_of_device_coordinates() const { return m_number_of_device_coordinates; } - u32 size() { return m_root_names.size(); } + u32 size() const { return m_root_names.size(); } // "In order to maintain maximum portability, it is strongly recommended that // special characters of the 7-bit ASCII set not be used." @@ -554,13 +554,13 @@ public: String const& root_name(u32 index) const { return m_root_names[index]; } // "7-bit ASCII" // Returns 7-bit ASCII. - ErrorOr color_name(u32 index); + ErrorOr color_name(u32 index) const; // "The PCS representation corresponds to the header’s PCS field." - XYZOrLAB const& pcs_coordinates(u32 index) { return m_pcs_coordinates[index]; } + XYZOrLAB const& pcs_coordinates(u32 index) const { return m_pcs_coordinates[index]; } // "The device representation corresponds to the header’s “data colour space” field." - u16 const* device_coordinates(u32 index) + u16 const* device_coordinates(u32 index) const { VERIFY((index + 1) * m_number_of_device_coordinates <= m_device_coordinates.size()); return m_device_coordinates.data() + index * m_number_of_device_coordinates;