View Image File Metadata From the Command Line

View Image File Metadata From the Command Line

Did you know you can access all the information store in a JPG/PNG/GIF
file from the command line? Install the ImageMagick package and do

identify -verbose image_file.jpg

The output will be something llike this:

Desktop$ identify -verbose thasu.jpg

Image: thasu.jpg
Format: JPEG (Joint Photographic Experts Group JFIF format)
Class: DirectClass
Geometry: 800×600+0+0
Resolution: 72×72
Print size: 11.1111×8.33333
Units: Undefined
Type: TrueColor
Endianess: Undefined
Colorspace: RGB
Depth: 8-bit
Channel depth:
red: 8-bit
green: 8-bit
blue: 8-bit
Channel statistics:
min: 0 (0)
max: 255 (1)
mean: 40.7125 (0.159657)
standard deviation: 73.2441 (0.287232)
kurtosis: 0.609629
skewness: 1.53781
min: 0 (0)
max: 255 (1)
mean: 52.529 (0.205996)
standard deviation: 91.3897 (0.358391)
kurtosis: 0.455854
skewness: 1.48962
min: 0 (0)
max: 255 (1)
mean: 51.1838 (0.200721)
standard deviation: 89.757 (0.351988)
kurtosis: 0.527622
skewness: 1.51096
Image statistics:
min: 0 (0)
max: 255 (1)
mean: 36.1063 (0.141593)
standard deviation: 76.8034 (0.30119)
kurtosis: 2.40766
skewness: 2.01127
Rendering intent: Undefined
Interlace: None
Background color: white
Border color: rgb(223,223,223)
Matte color: grey74
Transparent color: black
Compose: Over
Page geometry: 800×600+0+0
Dispose: Undefined
Iterations: 0
Compression: JPEG
Orientation: Undefined
date:create: 2010-07-11T19:50:46+05:00
date:modify: 2010-05-20T09:39:56+05:00
jpeg:colorspace: 2
jpeg:sampling-factor: 2×2,1×1,1×1
signature: e794b1f09975d276aed3b92e5d45511e3e08ced69b1f8f1151eab18556679bda
verbose: true
Tainted: False
Filesize: 97.8KiB
Number pixels: 469KiB
Pixels per second: 7.629MiB
User time: 0.030u
Elapsed time: 0:01.060
Version: ImageMagick 6.5.7-8 2009-11-26 Q16

You can use this to extract specific fields from image files and make
scripts that sort your images according to quality, background color
or image size.

→ Leave a comment


1 Comment

Filed under English

One response to “View Image File Metadata From the Command Line

  1. Pingback: Removing Metadata from Photographs – Personal Thoughts and Ramblings

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s