CSV column order with group and ICC_Profile information

Started by Quoth, November 25, 2020, 08:08:02 AM

Previous topic - Next topic

Quoth

Hi,

I'm having trouble dictating the order of columns in my CSV files when I recurse through a directory while including both group (G1) and ICC_Profile information:

exiftool -ext 'tif' -r -csv -G1 -System:FileSize -System:FileName -ICC_Profile:ProfileDescription .\directory

Produces the following column order:

SourceFile, ICC_Profile:ProfileDescription, System:FileName, System:FileSize

Though the removal of ICC_Profile information results in the expected order:

SourceFile, System:FileSize, System:FileName

This seems like it might be at least partially related to the caveat included in this post, but I seem to be using the correct group ID for the ICC profile's description. Using the group listed in the EXIF Tags documentation for "ICC_Profile" ("IFD0") doesn't return any information (neither "IFD0:ICC_Profile:ProfileDescription" nor "IFD0:ProfileDescription"). Does anyone know what I might be doing wrong here?

I understand that removing the grouping would also give the correct order, but I'd definitely like to keep the G1 groups as part of the headers for documentary purposes.

Phil Harvey

This is a complex problem.  The tags will be sorted in alphabetical order when using -G1 if any of the tags don't exist in any of the files.  This is because the family 1 group name of the tag will be "Unknown" if it doesn't exist, which doesn't match the group name that you specified, and results in the columns being resorted.

This will be tricky for me to fix, but I'll see about patching ExifTool 12.11 to make this behaviour more sensible.

- 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 ($).

Quoth

Ah, I see. That certainly matches up with what I'm seeing. Not all files have ICC profiles.

Thank you for the quick response, and all the effort you put into this tool.