image manipulation dpi

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
timtom
Forum Newbie
Posts: 4
Joined: Sat Oct 09, 2004 6:03 pm

image manipulation dpi

Post 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
User avatar
mudkicker
Forum Contributor
Posts: 479
Joined: Wed Jul 09, 2003 6:11 pm
Location: Istanbul, TR
Contact:

Post by mudkicker »

http://www.php.net/function.imagejpeg
there is a parameter with quality, maybe it would help ya.
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

quality != dpi
User avatar
mudkicker
Forum Contributor
Posts: 479
Joined: Wed Jul 09, 2003 6:11 pm
Location: Istanbul, TR
Contact:

Post by mudkicker »

feyd wrote:quality != dpi
yeah, got it after reading a while, but i said maybe, too. so i used my 50% chance ;)
Post Reply