Show Image Properties (Meta Data) from CLI Linux

Sponsored Links

If you use GUI then you can right-click on the pictures and see properties. But can you see the image properties (or metadata) from command line interface? Yes! you can do that using identify command. Here is how:

Make sure you have imagemagick (a.k.a photoshop in CLI) installed in your machine, then type this:

$identify yourpicture.jpg

Here is output example from my data:

DSC_1853.JPG JPEG 2256×1496 2256×1496+0+0 DirectClass 8-bit 739.941kb

or if you want more verbose output, you can use -verbose options

$identify -verbose yourpicture.jpg

The output:

Image: DSC_1853.JPG
  Format: JPEG (Joint Photographic Experts Group JFIF format)
  Class: DirectClass
  Geometry: 2256×1496+0+0
  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: 89.5625 (0.351226)
      Standard deviation: 52.4649 (0.205745)
    Green:
      Min: 0 (0)
      Max: 255 (1)
      Mean: 119.109 (0.467095)
      Standard deviation: 43.9453 (0.172334)
    Blue:
      Min: 0 (0)
      Max: 255 (1)
      Mean: 141.805 (0.556099)
      Standard deviation: 48.2326 (0.189148)
  Rendering intent: Undefined
  Resolution: 72×72
  Units: Undefined
  Filesize: 739.941kb
  Interlace: None
  Background color: white
  Border color: rgb(223,223,223)
  Matte color: grey74
  Transparent color: black
  Page geometry: 2256×1496+0+0
  Dispose: Undefined
  Iterations: 0
  Compression: JPEG
  Quality: 91
  Orientation: Undefined
  Exif:ColorSpace: 1
  Exif:ComponentsConfiguration: …
  Exif:CompressedBitsPerPixel: 2/1
  Exif:Compression: 6
  Exif:Contrast: 0
  Exif:CustomRendered: 0
  Exif:DateTime: 2007:12:08 19:36:59
  Exif:DateTimeDigitized: 2007:12:08 19:36:59
  Exif:DateTimeOriginal: 2007:12:08 19:36:59
  Exif:DigitalZoomRatio: 1/1
  Exif:ExifImageLength: 1496
  Exif:ExifImageWidth: 2256
  Exif:ExifOffset: 216
  Exif:ExifVersion: 0221
  Exif:ExposureBiasValue: 0/6
  Exif:ExposureMode: 0
  Exif:ExposureProgram: 0
  Exif:ExposureTime: 10/5000
  Exif:FileSource: .
  Exif:Flash: 0
  Exif:FlashPixVersion: 0100
  Exif:FNumber: 110/10
  Exif:FocalLength: 180/10
  Exif:FocalLengthIn35mmFilm: 27
  Exif:GainControl: 0
  Exif:InteroperabilityIndex: R98
  Exif:InteroperabilityOffset: 28816
  Exif:InteroperabilityVersion: 0100
  Exif:JPEGInterchangeFormat: 28956
  Exif:JPEGInterchangeFormatLength: 8552
  Exif:LightSource: 0
  Exif:Make: NIKON CORPORATION
  Exif:MakerNote: Nikon
  Exif:MaxApertureValue: 36/10
  Exif:MeteringMode: 5
  Exif:Model: NIKON D50
  Exif:Orientation: 1
  Exif:ResolutionUnit: 2
  Exif:Saturation: 0
  Exif:SceneCaptureType: 0
  Exif:SceneType: .
  Exif:SensingMethod: 2
  Exif:Sharpness: 0
  Exif:Software: Ver.1.00
  Exif:SubjectDistanceRange: 0
  Exif:SubSecTime: 80
  Exif:SubSecTimeDigitized: 80
  Exif:SubSecTimeOriginal: 80
  Exif:UserComment: ASCII
  Exif:WhiteBalance: 0
  Exif:XResolution: 300/1
  Exif:YCbCrPositioning: 2
  Exif:YResolution: 300/1
  Jpeg:colorspace: 2
  Jpeg:sampling-factor: 2×1,1×1,1×1
  Signature: 805cf28f0526825be104a1e2031775612fce132d1344c89fe59d86a0af23b864
  Profile-exif: 65532 bytes
  Tainted: False
  User time: 0.630u
  Elapsed time: 0:02
  Pixels per second: 3.21863mb
  Version: ImageMagick 6.3.7 02/19/08 Q16 http://www.imagemagick.org

Read more advanced usage of identify command right here.

All incoming search terms for this post

image properties linux (35) - linux jpeg metadata (35) - imagemagick metadata (28) - linux image properties (27) - jpeg metadata linux (22) - linux jpg metadata (22) - linux image metadata (17) - imagemagick show exif (16) - jpg metadata linux (12) - linux get image size (12) - linux show exif (10) - linux show exif data (10) - linux jpeg properties (10) - linux command line image properties (9) - linux read jpeg metadata (8) - image metadata linux (8) - view image metadata linux (8) - linux read exif data (8) - linux read jpg metadata (8) - linux jpg properties (8) - jpg properties linux (7) - imagemagick image properties (7) - read jpg metadata linux (7) - all (7) - linux get image properties (7) - properties (6) - linux display exif (6) - show jpeg metadata (6) - metadata linux (6) - linux metadata (6) - linux exif (6) - exif data linux (6) - imagemagick jpeg metadata (6) - imagemagick extract metadata (6) - linux show image size (6) - linux image exif (5) - linux image properties command line (5) - imagemagick show size (5) - jpeg properties linux (5) - show exif linux (5) - linux view image properties (5) - imagemagick jpg metadata (5) - Show Image Properties (5) - read jpeg metadata linux (5) - imagemagick meta data (5) - linux read exif (5) - linux view exif data (5) - cache:0lbFWI_cWsQJ:www.econowics.com/linux/258/show-image-properties-meta-data-from-cli-linux/ linux show exif data (5) - linux read image metadata (4) - linux exif data (4) -

7 Comments »

  1. View Image File Metadata From the Command Line | Tips4Linux.com Said,

    December 6, 2008 @ 3:09 pm

    […] Image: image_file.jpg  Format: JPEG (Joint Photographic Experts Group JFIF format)  Class: DirectClass  Geometry: 640×480+0+0  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: 115.959 (0.45474)      Standard deviation: 76.5409 (0.30016)    Green:      Min: 0 (0)      Max: 255 (1)      Mean: 114.635 (0.449548)      Standard deviation: 81.5852 (0.319942)    Blue:      Min: 0 (0)      Max: 255 (1)      Mean: 116.819 (0.458114)      Standard deviation: 84.7587 (0.332387)  Rendering intent: Undefined  Units: PixelsPerInch  Filesize: 62.5703kb  Interlace: None  Background color: white  Border color: rgb(223,223,223)  Matte color: grey74  Transparent color: black  Page geometry: 640×480+0+0  Dispose: Undefined  Iterations: 0  Compression: JPEG  Quality: 90  Orientation: Undefined  Jpeg:colorspace: 2  Jpeg:sampling-factor: 2×1,1×1,1×1  Signature: 59dddedfad604ea3f369256c41ed3f42bf6150cf960d62409cfc8c6103b65e18  Tainted: False  Version: ImageMagick 6.3.7 08/21/08 Q16 http://www.imagemagick.orgYou 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.Original tip here. […]

  2. View Image File Metadata From the Command Line | Linux-Trickz Said,

    December 6, 2008 @ 6:01 pm

    […] Image: image_file.jpg  Format: JPEG (Joint Photographic Experts Group JFIF format)  Class: DirectClass  Geometry: 640×480+0+0  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: 115.959 (0.45474)      Standard deviation: 76.5409 (0.30016)    Green:      Min: 0 (0)      Max: 255 (1)      Mean: 114.635 (0.449548)      Standard deviation: 81.5852 (0.319942)    Blue:      Min: 0 (0)      Max: 255 (1)      Mean: 116.819 (0.458114)      Standard deviation: 84.7587 (0.332387)  Rendering intent: Undefined  Units: PixelsPerInch  Filesize: 62.5703kb  Interlace: None  Background color: white  Border color: rgb(223,223,223)  Matte color: grey74  Transparent color: black  Page geometry: 640×480+0+0  Dispose: Undefined  Iterations: 0  Compression: JPEG  Quality: 90  Orientation: Undefined  Jpeg:colorspace: 2  Jpeg:sampling-factor: 2×1,1×1,1×1  Signature: 59dddedfad604ea3f369256c41ed3f42bf6150cf960d62409cfc8c6103b65e18  Tainted: False  Version: ImageMagick 6.3.7 08/21/08 Q16 http://www.imagemagick.orgYou 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.Original tip here. […]

  3. David Roberts Said,

    December 7, 2008 @ 2:52 pm

    Thanks — exactly what I was looking for.

  4. Astrofaces Team Said,

    April 5, 2009 @ 8:25 am

    Is it possible to make a Bash script to query the metadata to find jpg files that DO NOT have a specified height and width? Looked at imagemagick -identify, but it doesn’t seem to be able to ask, it just displays. We have thousands of jpgs, and would like a quick way to double check that they have been cropped to the correct size (100×150 and 200×300). Otherwise, we’ll send the output of -identify to a file, and examine that for exceptions.
    Thanks.

  5. Svertikall Said,

    October 2, 2009 @ 11:54 pm

    Привет. Подскажите, как перевести блог с бесплатного хостинга, вот мой блог php
    Вроде как wordpress должен легко двигаться на свежую площадку, но у меня все время промахи в базе данных. Я посмотрел там, но в php ничего не понимаю как говорится и привлекать сторонних программистов то ведь не хочется. Имеет возможность подскажите, как безболезненно перенести блог?

  6. Sad56 Said,

    October 23, 2009 @ 7:29 am

    Nervous breakdown, I am afraid. ,

  7. Virontau Said,

    March 11, 2010 @ 1:52 am

    Привет! Вы пишете очень интересно. Я, пожалуй, подпишусь. Спасибо за инфу. Если вам надо, что-то интересное посмотрите сдесь.

Leave a Comment