How to identify format and characteristics of image file

by on March 5, 2006 · 1 comment· LAST UPDATED March 5, 2006

in

To identify format and characteristics of image file you need to use command called identify.

It will also report if an image is incomplete or corrupt. The information displayed includes the scene number, the file name, the width and height of the image, whether the image is colormapped or not, the number of colors in the image, the number of bytes in the image, the format of the image (JPEG, PNM, etc.), and finally the number of seconds it took to read and process the image

If you are looking to provide scripting solution to automate task then this command is the best one.

$ identify -verbose snap-S25-20060218-235000-1.ppm | less

Output:

Image: snap-S25-20060218-235000-1.ppm
Format: PNM (Portable anymap)
Geometry: 768x576
Class: DirectClass
Colorspace: RGB
Type: TrueColor
Depth: 8 bits
Endianess: Undefined
Channel depth:
  Red: 8-bits
  Green: 8-bits
  Blue: 8-bits
Channel statistics:
  Red:
    Min: 0
    Max: 255
    Mean: 87.5478
    Standard deviation: 89.9707
  Green:
    Min: 0
    Max: 255
    Mean: 73.0576
    Standard deviation: 84.7219
  Blue:
    Min: 0
    Max: 255
    Mean: 53.6681
    Standard deviation: 73.7701
Colors: 163423
Rendering-intent: Undefined
Resolution: 72x72
Units: Undefined
Filesize: 1.3mb
Interlace: None
Background Color: grey100
Border Color: #DFDFDF
Matte Color: grey74
Dispose: Undefined
Iterations: 0
Compression: Undefined
Orientation: Undefined
signature: ad1ac5b547203e393117aab
Tainted: False
User Time: 0.020u
Elapsed Time: 0:01
TwitterFacebookGoogle+PDF versionFound an error/typo on this page? Help us!

{ 1 comment… read it below or add one }

1 Eli Skoczylas May 21, 2012 at 3:29 pm

The identify command is part of the ImageMagick software package.
If you don’t have it installed on your system, you won’t be able to run identify….

Directions to install ImageMagick are available at http://imagemagick.org/script/binary-releases.php

Reply

Leave a Comment

Tagged as:

Previous Faq:

Next Faq: