mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 16:27:35 +00:00
LibGfx: Make ICCHeader use RenderingIntent enum
No behavior change.
This commit is contained in:
parent
429467f46c
commit
78d849bce2
3 changed files with 11 additions and 14 deletions
|
@ -249,14 +249,11 @@ ErrorOr<RenderingIntent> parse_rendering_intent(ICCHeader const& header)
|
|||
{
|
||||
// ICC v4, 7.2.15 Rendering intent field
|
||||
switch (header.rendering_intent) {
|
||||
case 0:
|
||||
return RenderingIntent::Perceptual;
|
||||
case 1:
|
||||
return RenderingIntent::MediaRelativeColorimetric;
|
||||
case 2:
|
||||
return RenderingIntent::Saturation;
|
||||
case 3:
|
||||
return RenderingIntent::ICCAbsoluteColorimetric;
|
||||
case RenderingIntent::Perceptual:
|
||||
case RenderingIntent::MediaRelativeColorimetric:
|
||||
case RenderingIntent::Saturation:
|
||||
case RenderingIntent::ICCAbsoluteColorimetric:
|
||||
return header.rendering_intent;
|
||||
}
|
||||
return Error::from_string_literal("ICC::Profile: Invalid rendering intent");
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue