Page 1 of 1

image manipulation dpi

Posted: Sat Oct 09, 2004 6:05 pm
by timtom
Hi

I am working on a browser based image upload admin. I want to be able to do the following:

Recieve a high resolution image (jpg) from the user - 300 dpi. Resize it and save it, maintaining the 300 dpi - save a copy in 170 dpi, and finaly save a copy in 72 dpi.

The 300 and 170 dpi files are for the press to download for printing use - and they make it a must, that the files have exactly that resolution. Therefor the dpi values are essential.

I have tried with gd version 2.0.23 compatible - but it seems that whenever I save a new copy of the uploaded image, the jpg is 72 dpi.

Does anyone know if it can be done with the gd library - have any suggestions or other means to achieve what I need (excluding manual manipulation and upload)? can ImageMagick do the trick?

Any comments and help appreciated.

have a nice one.

/T

Posted: Sat Oct 09, 2004 6:08 pm
by mudkicker
http://www.php.net/function.imagejpeg
there is a parameter with quality, maybe it would help ya.

Posted: Sat Oct 09, 2004 6:10 pm
by feyd
quality != dpi

Posted: Sat Oct 09, 2004 6:16 pm
by mudkicker
feyd wrote:quality != dpi
yeah, got it after reading a while, but i said maybe, too. so i used my 50% chance ;)