hexdump and PNG's

Started by chuft-captain, February 17, 2020, 11:29:44 PM

Previous topic - Next topic

chuft-captain

Hi all,

I have a folder containing a mixture of PNG's and JPG's.

I executed: exiftool -htmldump -w tmp/%f_%e.html *.*

Seems to work for the jpg's, however for the png's all I get in the HTML file is:
QuoteNo EXIF or TIFF information found in image
Is it supposed to work for PNG's?

Additionally , if I repeat the command (without first deleting the TMP folder) it doesn't repeat and overwrite the HTML files (as I assumed it would).
Quote0 image files read
   13 files could not be read
    0 output files created

Incidentally, FYI the description of this command in the "ExifTool Command-Line Examples" (https://exiftool.org/examples.html) appears to be slightly in-accurate... It says:
QuoteThe output HTML files are written to the C directory
however, they are actually written to the TMP directory.

I'd appreciate any advice about the PNG issue and/or the overwriting issue.
Cheers
EXIFTOOL Documentation: https://exiftool.org/exiftool_pod.html

StarGeek

Quote from: chuft-captain on February 17, 2020, 11:29:44 PMIs it supposed to work for PNG's?

Only if the have an embedded EXIF block.  From the docs on the -htmlDump option (emphisis mine)
    Generate a dynamic web page containing a hex dump of the EXIF information.

Most PNG files do not have an EXIF block.  Really, most don't have much metadata, as a lot of programs simply don't support metadata in PNG files.  But it is getting changed.  Google Photos, for example, seems to read EXIF data in PNG files.

QuoteAdditionally , if I repeat the command (without first deleting the TMP folder) it doesn't repeat and overwrite the HTML files (as I assumed it would).

From the docs on the -w (textout) option
   Existing files will not be changed unless an exclamation point is added to the option name (ie. -w! or -textOut!) to overwrite the file, or a plus sign (ie. -w+ or -textOut+) to append to the existing file.
* Did you read FAQ #3 and use the command listed there?
* Please use the Code button for exiftool code/output.
 
* Please include your OS, Exiftool version, and type of file you're processing (MP4, JPG, etc).

chuft-captain

Quote
Most PNG files do not have an EXIF block.
Of course you're right. I did in fact know this from experience, but in the heat of the moment I completely forgot about that little detail!  :-[  Thanks for that!

Thanks also for the info about the exclamation mark. I did NOT know about that. I'm guessing that the ! and + qualifiers are probably available on a number of other exiftool options, not just the ones you mentioned.

Cheers!
EXIFTOOL Documentation: https://exiftool.org/exiftool_pod.html

Phil Harvey

Quote from: chuft-captain on February 18, 2020, 03:16:24 AM
I'm guessing that the ! and + qualifiers are probably available on a number of other exiftool options, not just the ones you mentioned.

It is best to read the documentation, rather than guessing. :P

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

chuft-captain

#4
Quote from: Phil Harvey on February 18, 2020, 07:47:41 AMIt is best to read the documentation, rather than guessing. :P
What documentation? :P

To be serious though ... I usually try to search the forum (or google) before posting a question to avoid wasting your time, however in this case the search box gave no results (although NOW, a search for -htmldump does at least return this thread  ;) )

A google search for exiftool -htmldump or exiftool -w does not give a lot of joy either ... if you forget that "-" is a special operator in a google search.  ;D
ie. (quotes are required for any GS involving exiftool switches.)

PS. Check out my updated signature!  8)
EXIFTOOL Documentation: https://exiftool.org/exiftool_pod.html

Phil Harvey

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

chuft-captain

QuoteNice sig.
Just there for my own benefit really ... although it might help to reduce the number of idiot questions you and @Stargeek have to deal with in future.  ;)

BTW ... does anyone actually RTFM these days?  :o ;D
EXIFTOOL Documentation: https://exiftool.org/exiftool_pod.html

StarGeek

I do.  And I still miss things.

Like in this case, I've never really used the -htmldump option but I went to check when you posted.  So I learned something new.  And the link to the docs on this got added to my clipboard history program, which is where I keep all the doc links I've used and why they'll always be exactly the same.  I'm a copy/paste fanatic.
* Did you read FAQ #3 and use the command listed there?
* Please use the Code button for exiftool code/output.
 
* Please include your OS, Exiftool version, and type of file you're processing (MP4, JPG, etc).

chuft-captain

Unlike you, I tend to only RTFM when I really have to!
I was actually trying to find a solution to a file-date sorting problem which I thought exiftool might help to solve, and in the process of investigating that, I came across this -htmldump option.
Like you, I'm always curious to learn new things, so when I saw this I thought I'd spend a few minutes trying it out just to see what it did ... which then lead to this post (which was really just about satisfying my curiosity).

... I just stumbled across this option and thought "that's cool ... I'll see what it does for future reference".

So I apologize for taking up your time and Phil's on something I have no immediate intention to use ... but I'm glad that you at least learned something as well.
EXIFTOOL Documentation: https://exiftool.org/exiftool_pod.html