-
Notifications
You must be signed in to change notification settings - Fork 295
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ComponentsConfiguration tag in TIFF ExifIFD #53
Comments
Hi Martin, I think you are right that ExifTool is applying the mandatory tags without checking the TIFF type. Doing this properly will be some work, but I'll take a look and see what I can do. |
Well, let me know if I can be of any help. My Perl skills are pretty out of date though ... |
So ... having read the Exif specification a little more I don't think there is a distinction to be made between uncompressed and compressed TIFF files but only between TIFF and JPEG files:
As far as I can tell, compressed TIFF files are not mentioned at all in the spec and all relevant statements could just as well be read with uncompressed replaced by TIFF and compressed replaced by JPEG. So maybe a compressed TIFF file cannot, by definition, be a valid Exif image file or rather counts as uncompressed as far as Exif is concerned? With this premise the ExifVersion, FlashpixVersion and ColorSpace tags are in fact mandatory for both uncompressed and compressed files. The ComponentsConfiguration tag on the other hand is not allowed in uncompressed (i.e., TIFF) but mandatory in compressed (i.e., JPEG) files. As a consequence, I can now answer my own questions from the original issue:
So if you ask me, remove ComponentsConfiguration from the automatically added tags when writing TIFF files and everything's fine. But you should probably double check my assumptions first. ;-) Cheers, |
Hi Martin, Interesting. I haven't re-read the spec, but Photoshop has options to save compressed TIFF images using LZW, ZIP and JPEG compression. I don't have time right now to check the metadata that is written for each of these, but I'll try this when I get a chance and run each of them through the ExifTool validation.
|
OK, this is what I get: % exiftool tmp -validate -warning -a % exiftool tmp -compression -photometricinterpretation -a -G1 I still don't have time to sit down and sift through the specification to see what warnings should be issued for these files, but at least it is good to have this record of what Photoshop is doing.
|
Hi Phil,
I have a question regarding mandatory tags that "may be added automatically with default values when creating a new IFD" according to the ExifTool docs, particularly the ComponentsConfiguration tag in the TIFF ExifIFD.
Using ExifTool 12.01 I used
exiftool -ISO=42
on an uncompressed TIFF file (see attached file uncompressed-0.tif, source) and on the same file with LZW compression applied (compressed-0.tif, created with ImageMagickconvert -compress LZW
), resulting in uncompressed-1.tif and compressed-1.tif, respectively.Adding the ISO tag results in this newly created ExifIFD (same in uncompressed and compressed files):
I am a little confused by the ComponentsConfiguration tag.
R, G, B, -
. So this is weird anyway.)Y, Cb, Cr, -
appropriate? The files use PhotometricInterpretation "RGB" which made me wonder: I thought RGB and YCbCr are two different color models, so wouldn'tR, G, B, -
be preferable in this case? But I don't know much about color stuff, so I may be totally lost here. Grateful for any clarification! ;-)exiftool -validate -warning -a
) issues warnings for both uncompressed and compressed files: "ExifIFD tag 0x9101 ComponentsConfiguration is not allowed in TIFF". Huh?Maybe you can enlighten me a little?
Thanks,
Martin
The text was updated successfully, but these errors were encountered: