Hi there,
I am using exiftool to extract certain metadata from files. However, I have trouble extracting color information (RGB, CMY, etc) for images, specially JPEG images. I used the following tags, some commands get color information for some jpegs, while some don't: colormode, colorspacedata, swatchgroupscolorantsmode.
Below is an example when run through command line:
1. Using colorspacedata; I'm getting proper output for this files. However, for some other jpegs, not getting any output at all
/opt/artesia67/Image-ExifTool-10.10/exiftool -colorspacedata 018_MI5-02058dfRc.jpg
The output I get above is: Color Space Data : RGB
2. Using colormode: For the same file colormode does not give output at all, but for other jpegs, sometimes color mode gives output
/opt/artesia67/Image-ExifTool-10.10/exiftool -colormode 018_MI5-02058dfRc.jpg
3. Using swatchgroupscolorantsmode: Gives a warning message and does not give color information. For other jpegs, sometimes gives proper output:
/opt/artesia67/Image-ExifTool-10.10/exiftool -swatchgroupscolorantsmode 018_MI5-02058dfRc.jpg
Output:
Warning: [Minor] Extracted only 1000 photoshop:DocumentAncestors items. Ignore minor errors to extract all - Requwer_dfi_ORZ1_2048X1536.jpg
Please help me as i need one single command which will extract color information for all the jpegs. I am using a NIX machine.
Kindly note that Exiftool is installed properly, I'm able to extract other details like dimensions, etc. Only color seems to be problematic!
Your assistance is much appreciated!
Thanks you
ColorSpaceData is an ICC_Profile tag. Most JPEG's don't contain an ICC profile, so this tag won't exist.
You can also look at the EXIF:ColorSpace and Adobe:ColorTransform tags.
- Phil
Thanks for the response Phil.
However, again for certain jpegs this issue still persist, Adobe:ColorTransform and EXIF:ColorSpace do not give output to certain Jpegs.
When I execute them through terminal it just goes to the next line without any output.
/directory/images/Image-ExifTool-10.10/exiftool -EXIF:ColorSpace Ridiculousness_1.jpg
/directory/images/Image-ExifTool-10.10/exiftool -Adobe:ColorTransform Ridiculousness_1.jpg
When I execute these for other jpegs they work fine, but I'm looking for a solution which will give me color information for all the jpegs.
Can you please advise?
Thanks for your time!
There is no universal solution.