ExifTool Forum

ExifTool => The "exiftool" Application => Topic started by: Quoth on November 25, 2020, 08:08:02 AM

Title: CSV column order with group and ICC_Profile information
Post by: Quoth on November 25, 2020, 08:08:02 AM
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 (https://exiftool.org/forum/index.php?topic=5589.msg27207#msg27207), but I seem to be using the correct group ID for the ICC profile's description. Using the group listed in the EXIF Tags (https://exiftool.org/TagNames/EXIF.html) 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.
Title: Re: CSV column order with group and ICC_Profile information
Post by: Phil Harvey on November 25, 2020, 09:12:28 AM
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

Title: Re: CSV column order with group and ICC_Profile information
Post by: Quoth on November 25, 2020, 09:29:35 AM
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.