MoonPoint Support Logo

 


Shop Amazon Warehouse Deals - Deep Discounts on Open-box and Used ProductsAmazon Warehouse Deals



Advanced Search
January
Sun Mon Tue Wed Thu Fri Sat
 
16 17 18 19 20
21 22 23 24 25 26 27
28 29 30 31      
2018
Months
JanFeb Mar
Apr May Jun
Jul Aug Sep
Oct Nov Dec


Sun, Jul 09, 2017 10:36 pm

exiv2

If you want to determine the size of an image file on a Linux system, for some types of image files, e.g., PNG or GIF files, you can just use the file command. E.g.:

$ file ~/Documents/System_Memory.png
/home/jdoe/Documents/System_Memory.png: PNG image data, 800 x 600, 8-bit/color RGBA, non-interlaced
$ file ~/Documents/recipes/asparagus-strawberry-salad.gif
/home/jdoe/Documents/recipes/asparagus-strawberry-salad.gif: GIF image data, version 89a, 250 x 153
$

But if you obtain information on a JPG/JPEG file with that command, it doesn't provide any information on the dimensions of the image.

$ file ~/Documents/Winter.jpg
/home/jdoe/Documents/Winter.jpg: JPEG image data, JFIF standard 1.02
$

If you install the exiv2 package, you can also display the dimensions of JPEG images as well as PNG, GIF, and other image formats.

$ exiv2 /home/jdoe/Documents/Winter.jpg
File name       : /home/jdoe/Documents/Winter.jpg
File size       : 105542 Bytes
MIME type       : image/jpeg
Image size      : 800 x 600
/home/jdoe/Documents/Winter.jpg: No Exif data found in the file
$ exiv2 /home/jdoe/Documents/System_Memory.png
File name       : /home/jdoe/Documents/System_Memory.png
File size       : 135335 Bytes
MIME type       : image/png
Image size      : 800 x 600
/home/jdoe/Documents/System_Memory.png: No Exif data found in the file
$ exiv2 /home/jdoe/Documents/recipes/asparagus-strawberry-salad.gif
File name       : /home/jdoe/Documents/recipes/asparagus-strawberry-salad.gif
File size       : 31346 Bytes
MIME type       : image/gif
Image size      : 250 x 153
/home/jdoe/Documents/recipes/asparagus-strawberry-salad.gif: No Exif data found in the file
$

[ More Info ]

[/os/unix/programs/graphics] permanent link

Once You Know, You Newegg AliExpress by Alibaba.com

Shop Amazon Local - Subscribe to Deals in Your Neighborhood

Valid HTML 4.01 Transitional

Privacy Policy   Contact

Blosxom logo