[CentOS] command to echo size of images

Kanwar Ranbir Sandhu m3freak at rogers.com
Fri Jun 23 13:49:24 UTC 2006


On Wed, 2006-21-06 at 09:52 -0400, Jerry Geis wrote:
> Is there a command line program in centos to echo back the size of an
> image (gif,jpg,png)?
> I did see that file image.jpg sometimes works but reports the wrong
> image size.
> I see xview image.jpg reports the correct size but I dont want to see
> the image just get its size.

[ksandhu at krs downloads]$ file tux-sit3-shine.7.gif
tux-sit3-shine.7.gif: GIF image data, version 89a, 327 x 360

The file package should already be installed on your box, if not a 'yum
install file' will do the trick.

No need to install ImageMagick, unless of course you want the extra
features ImageMagick provides.

HTH,

Ranbir
-- 
Kanwar Ranbir Sandhu
Linux 2.6.16-1.2115_FC4 i686 GNU/Linux 
09:47:24 up 3:17, 3 users, load average: 0.65, 0.63, 0.61 





More information about the CentOS mailing list