Page 1 of 1

identify -density "%wx%h" image.jpg ???

Posted: 2007-09-20T05:15:46-07:00
by poincare999
I want know the density of my image (300x300, 600x600, and so on.)
I have tried with

Code: Select all

identify -density "%wx%h" image.jpg
and I have recived this answer

Code: Select all

image.jpg JPEG 1536x2048 1536x2048+0+0 DirectClass 6e+02kb
.

But I want the "density" not the "format", what can I do?

Re: identify -density "%wx%h" image.jpg ???

Posted: 2007-09-20T09:31:07-07:00
by el_supremo
"-density" is the wrong argument.
Try:

Code: Select all

identify -format "%x x %y" image.jpg
This will give the resolution and its units.
For the valid format arguments see: http://imagemagick.org/script/command-l ... php#format

Pete

Re: identify -density "%wx%h" image.jpg ???

Posted: 2007-09-20T12:05:38-07:00
by poincare999
It works, thank you.