Page 1 of 1

PHP Image Processing

Posted: Thu May 10, 2007 10:31 am
by joadard
Hi,

I've been using PHP for some time, but have only recently entered into the arena of working with it where images are concerned.

I was looking at the image functions and haven't been able to determine whether PHP accommodates an image processing feature where it would resize the image (not in terms of height and width) to be web ready.

For example, the photos that might be uploaded from a camera are going to be high resolution and quite large in file size. Is there a function/list of functions in PHP that would allow you to convert that to a 72 dpi file in order to display it on the web.

I have found imagecreatefromjpeg - but am not sure if that's the correct function.

If someone could point me in the right direction (pointing to a tutorial would be ideal!) I would be greatly appreciative!

Thank you :-)

Posted: Mon May 14, 2007 10:16 am
by feyd
dpi rating isn't really a function of the image functions, but rather apart of the image format itself and doesn't really apply to most viewings. Simply changing the dpi rating from 300 to 72 for example would increase the size displayed unless a resize operation is also performed. PHP offers resizing via the calling of several functions. They are all listed on the image functions page and have been talked about hundreds of times here.