Editing
Reporting Image File Metadata
(section)
Jump to navigation
Jump to search
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
== Usage == === Dump all metadata === <syntaxhighlight lang="bash"> $ exiftool *.psd </syntaxhighlight> === Dump select metadata properties === Metadata field names can be added as arguments to filter down the output: <syntaxhighlight lang="bash"> $ exiftool -ImageSize *.psd Image Size : 3075x1779 $ exiftool -ImageWidth -ImageHeight B264BS68*.psd ======== B264BS681_167.psd Image Width : 3075 Image Height : 1779 ======== B264BS682_171.psd Image Width : 3048 Image Height : 1790 2 image files read </syntaxhighlight> === Format the output === `Exiftool` can output in various formats, e.g. CVS, XML, JSON. [http://www.sno.phy.queensu.ca/~phil/exiftool/exiftool_pod.html#input_output_text_formatting Documentation on the supported formats]. ==== CVS ==== A cvs file must already exist (you can't simply redirect output into a new file). The first line of the CVS must contain headers to match all the fields output by the `exiftool` command. The first field must be `SourceFile`. This will be the name of the file from which the metadata was read. So for the image width and height for a batch of files the CVS starter template would look like this: <syntaxhighlight lang="text"> SourceFile,ImageWidth,ImageHeight </syntaxhighlight> It doesn't matter if there is a newline or not after that first line. The command for writing to that file (assuming it's named `stats.csv`): <syntaxhighlight lang="bash"> $ exiftool -ImageWidth -ImageHeight -csv *.psd > stats.csv </syntaxhighlight> Result: <syntaxhighlight lang="text"> SourceFile,ImageWidth,ImageHeight B264BS681_167.psd,3075,1779 B264BS682_171.psd,3048,1790 B264BS714_251.psd,3164,1860 B264BS720_298.psd,3066,1779 </syntaxhighlight>
Summary:
Please note that all contributions to Littledamien Wiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
Littledamien Wiki:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Navigation menu
Personal tools
Not logged in
Talk
Contributions
Create account
Log in
Namespaces
Page
Discussion
English
Views
Read
Edit
View history
More
Search
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Tools
What links here
Related changes
Special pages
Page information