mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 04:27:45 +00:00
LibGfx: Sort ICC parsing functions by spec number
This commit is contained in:
parent
a7806d410a
commit
27189850d8
1 changed files with 14 additions and 14 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue