mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 11:27:35 +00:00
LibGfx+icc: Read cicpType
This is a very new tag used for HDR content. The only files I know that use it are the jpegs on https://ccameron-chromium.github.io/hdr-jpeg/ But they have an invalid ICC creation date, so `icc` can't process them. (Commenting out the check for that does allow to print them.) If the CIPC tag is present, it takes precedence about the actual data in the profile and from what I understand, the ICC profile is basically ignored. See https://www.color.org/events/HDR_experts.xalter for background, in particular https://www.color.org/hdr/02-Luke_Wallis.pdf (but the other talks are very interesting too). (PNG also has a cICP chunk that's supposed to take precedence over iCCP.)
This commit is contained in:
parent
a434b89521
commit
e8bbb3d915
5 changed files with 64 additions and 2 deletions
|
@ -572,6 +572,8 @@ ErrorOr<NonnullRefPtr<TagData>> Profile::read_tag(ReadonlyBytes bytes, u32 offse
|
|||
|
||||
auto type = tag_type(tag_bytes);
|
||||
switch (type) {
|
||||
case CicpTagData::Type:
|
||||
return CicpTagData::from_bytes(tag_bytes, offset_to_beginning_of_tag_data_element, size_of_tag_data_element);
|
||||
case CurveTagData::Type:
|
||||
return CurveTagData::from_bytes(tag_bytes, offset_to_beginning_of_tag_data_element, size_of_tag_data_element);
|
||||
case Lut16TagData::Type:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue