View Full Version : Imagemagick

10-01-2007, 04:03 PM

Don't know if this should go in here or PHP but I'll try and explain:

I have a website for a client who wants to print out images in a credit card size format of images uploaded by users of the site.

The only problem I can see is that there 2 media involved here - computer images and printed images.

I am using Imagemagick to convert and edit the images to a suitable scale but am having problems obtaining the resolution of the image uploaded. I am planning on using the resolution to obtain the width and height of the image (mm) so that I can see if the image is suitable to print.

Grateful for any advice.


10-01-2007, 06:09 PM
If you have the GD library installed then you should be able to use getimagesize() (http://us2.php.net/manual/en/function.getimagesize.php)

It helps to read the php manual from time to time.

10-02-2007, 11:11 AM
getimagesize() does not give the image resolution. But thanks for the response:cool:


10-02-2007, 05:32 PM
So you are wanting to know if the image is at 300dpi or 72dpi, etc.?