summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibGfx/ICCProfile.cpp
diff options
context:
space:
mode:
authorNico Weber <thakis@chromium.org>2023-01-04 13:42:37 -0500
committerAndreas Kling <kling@serenityos.org>2023-01-05 10:54:35 +0100
commit27189850d8ce07442626509e0ee0ec1e689b186a (patch)
tree93f136da42e3ecc45d7277de690bca1770f77587 /Userland/Libraries/LibGfx/ICCProfile.cpp
parenta7806d410a1c66e9e8ff824cad60d328f24d95a3 (diff)
downloadserenity-27189850d8ce07442626509e0ee0ec1e689b186a.zip
LibGfx: Sort ICC parsing functions by spec number
Diffstat (limited to 'Userland/Libraries/LibGfx/ICCProfile.cpp')
-rw-r--r--Userland/Libraries/LibGfx/ICCProfile.cpp28
1 files changed, 14 insertions, 14 deletions
diff --git a/Userland/Libraries/LibGfx/ICCProfile.cpp b/Userland/Libraries/LibGfx/ICCProfile.cpp
index f7711ce33e..72492006af 100644
--- a/Userland/Libraries/LibGfx/ICCProfile.cpp
+++ b/Userland/Libraries/LibGfx/ICCProfile.cpp
@@ -192,6 +192,20 @@ ErrorOr<ColorSpace> parse_connection_space(ICCHeader const& header)
return space;
}
+ErrorOr<time_t> parse_creation_date_time(ICCHeader const& header)
+{
+ // ICC v4, 7.2.8 Date and time field
+ return parse_date_time_number(header.profile_creation_time);
+}
+
+ErrorOr<void> parse_file_signature(ICCHeader const& header)
+{
+ // ICC v4, 7.2.9 Profile file signature field
+ if (header.profile_file_signature != 0x61637370)
+ return Error::from_string_literal("ICC::Profile: profile file signature not 'acsp'");
+ return {};
+}
+
ErrorOr<RenderingIntent> parse_rendering_intent(ICCHeader const& header)
{
// ICC v4, 7.2.15 Rendering intent field
@@ -219,20 +233,6 @@ ErrorOr<XYZ> parse_pcs_illuminant(ICCHeader const& header)
return xyz;
}
-
-ErrorOr<time_t> parse_creation_date_time(ICCHeader const& header)
-{
- // ICC v4, 7.2.8 Date and time field
- return parse_date_time_number(header.profile_creation_time);
-}
-
-ErrorOr<void> parse_file_signature(ICCHeader const& header)
-{
- // ICC v4, 7.2.9 Profile file signature field
- if (header.profile_file_signature != 0x61637370)
- return Error::from_string_literal("ICC::Profile: profile file signature not 'acsp'");
- return {};
-}
}
StringView device_class_name(DeviceClass device_class)