Menu

13 July 2010

View Image File Metadata From the Command Line

---------- Forwarded message ----------
From: Tha.Suresh <jemenisuresh AT gmail.com>
Date: Tue, Jul 13, 2010 at 2:32 AM


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
this:

identify -verbose image_file.jpg

The output will be something llike this:

arulalan@arul-desktop:~/
Desktop$ identify -verbose thasu.jpg

Image: thasu.jpg
 Format: JPEG (Joint Photographic Experts Group JFIF format)
 Class: DirectClass
 Geometry: 800x600+0+0
 Resolution: 72x72
 Print size: 11.1111x8.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:
   red:
     min: 0 (0)
     max: 255 (1)
     mean: 40.7125 (0.159657)
     standard deviation: 73.2441 (0.287232)
     kurtosis: 0.609629
     skewness: 1.53781
   green:
     min: 0 (0)
     max: 255 (1)
     mean: 52.529 (0.205996)
     standard deviation: 91.3897 (0.358391)
     kurtosis: 0.455854
     skewness: 1.48962
   blue:
     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:
   Overall:
     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: 800x600+0+0
 Dispose: Undefined
 Iterations: 0
 Compression: JPEG
 Orientation: Undefined
 Properties:
   date:create: 2010-07-11T19:50:46+05:00
   date:modify: 2010-05-20T09:39:56+05:00
   jpeg:colorspace: 2
   jpeg:sampling-factor: 2x2,1x1,1x1
   signature: e794b1f09975d276aed3b92e5d45511e3e08ced69b1f8f1151eab18556679bda
 Artifacts:
   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 http://www.imagemagick.org

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.


By

_________
Regards,
Tha.Suresh

Posted via email from LUG@IITD Community Blog

Post a Comment