validate - question of understanding

Started by herb, February 06, 2017, 07:02:56 AM

Previous topic - Next topic

herb

Hello Phil,

thanks for the new feature -validate.
But for all my images taken with an Olympus camera E-PL6 I get the following output for command:
exiftool.exe -all:all -validate validate.jpg

---- ExifTool ----
ExifTool Version Number         : 10.41
Warning                         : [minor] Odd offset for ExifIFD tag 0x9003
Warning                         : [minor] Odd offset for ExifIFD tag 0x9004
Validate                        : 2 Warnings (all minor)
Validate                        : 2 Warnings (all minor)
< all other tags removed>


Can you please give a short explanation, why the offset of tags DateTimeOriginal and CreateDate is "odd".
I have attached a htmldump of such a file.

And by the way, why is the info "Validate: 2 Warnings (all minor)" given twice?

Best regards
Herb

Phil Harvey

#1
Hi Herb,

The TIFF/EXIF specification states that all values should be on even-byte boundaries so ExifTool warns about ones that are on odd-byte boundaries.  You can see this best in the -htmldump output.

The Validate tag is reported twice because you requested it twice: once with -all:all and a second time with -validate.  Hmmm.  This makes it difficult to include the Validate tag in the rest of the output.  I was thinking of it as more of a stand-alone feature.  I'll have to think about this.

- Phil

Edit: OK.  I'll enhance the API Validate option so that the following command may be used with ExifTool 10.42 to extract all tags including the Validate tag:

exiftool -api validate=2 FILE

Also, I notice that it wasn't validating the JPEG image data as I had intended, so this will be fixed in 10.42 as well.
...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 ($).

herb

Hello Phil,

thanks for your fast reply.
That the values should be on even-byte bounderies was new to me.

Best regards
Herb

herb

Hello Phil,

please allow another comment to "exiftool -api validate=2 FILE".

Exiftool 10.41 does the following
- exiftool -validate FILE:            gives only result of validation
- exiftool -all:all FILE                  gives all tags, but no result of validation
- exiftool -all:all -validate FILE   gives all tags and also result of validation (but why twice?)

It is now unclear to me what -api validate=2 is good for?

Best regards
Herb

Phil Harvey

Hi Herb,

Actually, I changed my mind about -api validate=2 because you can already do this now with -api requesttags=validate.

Your command gives Validate twice for the same reason that this command gives FileName twice:

exiftool -all:all -filename FILE

The only difference is that the Validate tag isn't normally generated, so if you just specify -all:all it doesn't appear.  But once it is generated, it is included with all of the tags.

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

herb

Hello Phil,

thanks for your explanations and for the hint -api requesttags=validate.

I worked with it and I have seen that for files - with no IPTC tags - the command
exiftool -iptc:all -api requesttags=validate FILE
gives the validate output to stderr (not on stdout) and adds the name of the file.

I this case it would be fine to have the result for valiadte only on stdout without addition of filename.

Best regards
Herb

Phil Harvey

Hi Herb,

You are confused again.  You won't see the Validate tag if you ask only for -iptc:all.

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

herb

Hello Phil,

Yes you are right, I am confused now. I see only the warning.

Thanks and Best regards
Herb