mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-22 23:50:19 +00:00
LibGfx: Sort ICC parsing functions by spec number
This commit is contained in:
parent
a7806d410a
commit
27189850d8
Notes:
sideshowbarker
2024-07-17 04:01:41 +09:00
Author: https://github.com/nico Commit: https://github.com/SerenityOS/serenity/commit/27189850d8 Pull-request: https://github.com/SerenityOS/serenity/pull/16823 Reviewed-by: https://github.com/MacDue
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…
Reference in a new issue