Reporting Image File Metadata: Difference between revisions
No edit summary |
No edit summary |
||
| Line 1: | Line 1: | ||
[[Category:Production]] | [[Category:Design]][[Category:Photoshop]][[Category:Animation]][[Category:Configuration]][[Category:Production]] | ||
== Example == | == Example == | ||
Latest revision as of 17:12, 4 October 2016
Example[edit]
Print out a list of image dimensions for a series of Photoshop files.
Software[edit]
Exiftool, available for download here. (Mac and Windows)
The download page lists all supported file formats.
Usage[edit]
Dump all metadata[edit]
$ exiftool *.psd
Dump select metadata properties[edit]
Metadata field names can be added as arguments to filter down the output:
$ 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
Format the output[edit]
Exiftool can output in various formats, e.g. CVS, XML, JSON. Documentation on the supported formats.
CVS[edit]
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:
SourceFile,ImageWidth,ImageHeight
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):
$ exiftool -ImageWidth -ImageHeight -csv *.psd > stats.csv
Result:
SourceFile,ImageWidth,ImageHeight B264BS681_167.psd,3075,1779 B264BS682_171.psd,3048,1790 B264BS714_251.psd,3164,1860 B264BS720_298.psd,3066,1779