mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 21:27:34 +00:00
LibGfx+icc: ICCProfile's primary_platform() should be optional
Found by running `icc` on a jpeg file produced by a Pixel phone after #17195.
This commit is contained in:
parent
3cd04f40e1
commit
87f1a0e957
3 changed files with 8 additions and 4 deletions
|
@ -243,9 +243,13 @@ ErrorOr<void> parse_file_signature(ICCHeader const& header)
|
|||
return {};
|
||||
}
|
||||
|
||||
ErrorOr<PrimaryPlatform> parse_primary_platform(ICCHeader const& header)
|
||||
ErrorOr<Optional<PrimaryPlatform>> parse_primary_platform(ICCHeader const& header)
|
||||
{
|
||||
// ICC v4, 7.2.10 Primary platform field
|
||||
// "If there is no primary platform identified, this field shall be set to zero (00000000h)."
|
||||
if (header.primary_platform == PrimaryPlatform { 0 })
|
||||
return OptionalNone {};
|
||||
|
||||
switch (header.primary_platform) {
|
||||
case PrimaryPlatform::Apple:
|
||||
case PrimaryPlatform::Microsoft:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue