Dealing with Two Embedded ICC Profiles in HEICs

Started by blue-j, August 15, 2022, 03:42:26 AM

Previous topic - Next topic

blue-j

A lot of HEICs have two ICC profiles - one for the image data, the other for the depth map image.

OK, ExifTool is awesome and numbers them perfectly.  But here's my problem.

icc_profile:icc_profile2:ProfileDescription
and

icc_profile:ProfileDescription
both can grab the same data, because there appears to be no way to specify the ICC profile that is not numbered.

I tried

icc_profile:icc_profile:ProfileDescription
but that fails entirely.

It's likely I am messing up here, but can anyone guide me on how to address this?

- J

StarGeek

Maybe using the output from -G4 will give you the instance numbers you need?
"It didn't work" isn't helpful. What was the exact command used and the output.
Read FAQ #3 and use that cmd
Please use the Code button for exiftool output

Please include your OS/Exiftool version/filetype

blue-j

This rabbit hole is quite deep.  I *think* I may have figured out what needs to be done?

QuickTime ItemPropCont Tags
Tag ID Tag Name                 Writable             Values / Notes
'colr' ICC_ProfileColorRepresentation -no

I believe the tag "ICC_ProfileColorRepresentation" was not actually implemented, or I am understanding something wrong.

https://exiftool.org/TagNames/QuickTime.html

- J

StarGeek

Quote from: blue-j on August 15, 2022, 04:53:58 PMQuickTime ItemPropCont Tags
Tag ID Tag Name                 Writable             Values / Notes
'colr' ICC_ProfileColorRepresentation -no

I believe the tag "ICC_ProfileColorRepresentation" was not actually implemented, or I am understanding something wrong.

I believe you're combining two separate entries there.  ICC_Profile is on a separate line and points to the ICC_Profile Tags page while ColorRepresentation is listed as not writable. Phil would have to provide more details, though.

You can see both by using -G1:4
C:\>exiftool -G1:4 -a -s -colorspacetags Y:\!temp\ccc\D\8013.heic
[ExifIFD]      ColorSpace                      : Uncalibrated
[ICC_Profile:Copy1] ICC_Profile                : (Binary data 548 bytes, use -b option to extract)
[ICC_Profile]  ICC_Profile                    : (Binary data 356 bytes, use -b option to extract)

Both can be extracted at once.  The output size matches the embedded size
C:\>
C:\Programs\My_Stuff>exiftool -a -b -W %d%f_%t%-c.%s -ICC_Profile Y:\!temp\ccc\D\8013.heic
    2 output files created

C:\>exiftool -G1 -a -s -filesize -ext icc Y:\!temp\ccc\D
======== Y:/!temp/ccc/D/8013_ICC_Profile-1.icc
[System]        FileSize                        : 356 bytes
======== Y:/!temp/ccc/D/8013_ICC_Profile.icc
[System]        FileSize                        : 548 bytes
    1 directories scanned
    2 image files read

Copy1 can be extracted by itself.  Output after I deleted the previous .icc files
C:\>exiftool -a -b -W %d%f_%t%-c.%s -Copy1:ICC_Profile Y:\!temp\ccc\D\8013.heic
    1 output files created

C:\>exiftool -G1 -a -s -filesize -ext icc Y:\!temp\ccc\D
======== Y:/!temp/ccc/D/8013_ICC_Profile.icc
[System]        FileSize                        : 548 bytes
    1 directories scanned
    1 image files read

The first one can be extracted by not including the -a option
C:\>exiftool -b -W %d%f_%t%-c.%s -ICC_Profile Y:\!temp\ccc\D\8013.heic
    1 output files created

C:\>exiftool -G1:3 -a -s -filesize -ext icc Y:\!temp\ccc\D
======== Y:/!temp/ccc/D/8013_ICC_Profile.icc
[System:Main]   FileSize                        : 356 bytes
    1 directories scanned
    1 image files read

"It didn't work" isn't helpful. What was the exact command used and the output.
Read FAQ #3 and use that cmd
Please use the Code button for exiftool output

Please include your OS/Exiftool version/filetype

Phil Harvey

The QuickTime 'colr' tag may be either an ICC_Profile or a ColorRepresentation structure.  The next version of ExifTool will decode these structure elements, but it isn't currently writable.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).