On my PHP application, I allow users to upload images.
I then process the images to resize it to a manageable size.
Within my PHP script, I run the following UNIX command (ImageMagick):
convert -size 320x240
This limits/constrains the height/width to be no larger than 320 by 240.
However, I don't know actually what size "convert" resizes the image to.
ImageMagick might make the image: 320x100 or maybe 215x240 ... I just don't know because it's simply contraining the image to be no larger than 320x240 proportionally.
Is there an easy way for me to determine what size "convert" is resizing my images too?
By the way, I've looked into the PHP 'getimagesize' command but that is a very inefficient way to determine the image dimensions given that it needs to download the ENTIRE image even though the dimensions is stored in the few few bytes of the header.
Ideally, it would be great if 'convert
' can return the image dimensions after it resizes the images though I'm not certain that can be done.
Thanks in advance