LibGfx: Sort ICC parsing functions by spec number

This commit is contained in:
Nico Weber 2023-01-04 13:42:37 -05:00 committed by Andreas Kling
parent a7806d410a
commit 27189850d8
Notes: sideshowbarker 2024-07-17 04:01:41 +09:00

View file

@ -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)