Hi
I have an image: image.jpg.
I want know how many pixels it has.
What commad must I use?
For instance, If "image.jpg" has the resolution of 1536x2048 pixels, I want a command tells me that the resolution of "image.jpeg" is 1536x2048 pixels.
Thanks.
How many pixels my image has like resolution?
Re: How many pixels my image has like resolution?
Code: Select all
identify -format "%wx%h" picture.jpg
Code: Select all
exec('identify -format "%wx%h" picture.jpg', $a); print_r($a);
- anthony
- Posts: 8883
- Joined: 2004-05-31T19:27:03-07:00
- Authentication code: 8675308
- Location: Brisbane, Australia
Re: How many pixels my image has like resolution?
Note that is not however the images resolution, but it's size. Resolution is expressed as points or dots per real-world mesaure. For example dpi, Dots Pre Inch.
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
https://imagemagick.org/Usage/