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

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
poincare999

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

Post 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?
el_supremo
Posts: 1015
Joined: 2005-03-21T21:16:57-07:00

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

Post 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
poincare999

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

Post by poincare999 »

It works, thank you.
Post Reply