Click to See Complete Forum and Search --> : Image Manipulation - Height, Width, DPI


Phill Pafford
08-07-2007, 09:57 AM
Hey All,

I have been looking for a PHP solution for my problem.

I have seem many sites that show you how to re-size the Height and Width of an image, but nothing with the DPI of an image.

Problem;

Have an image of 800 x 600 with a DPI of 200

Solution:

Need to re-size the image to a smaller number divisible by 8

AND

to have the image at 120 DPI

Setup:

Running php 4.3
OS: Suse 10.1

Do not have the GD library installed :-(, but I think I can install it if needed

Thanks in advance

kbc1
08-07-2007, 10:17 AM
Hi Phil

Images can only be viewed at 72 DPI on a web page anyway so what is the need to resample at anything above?

The GD library (which you will need to install) comes with a couple of functions that will help you out:

imagecopyresampled();
imagecreatetruecolor();

Good luck

Phill Pafford
08-07-2007, 10:20 AM
The reason is that these images goto a mainframe and need to be in a certain format

ellisgl
08-07-2007, 02:15 PM
I would also look at imagemagick.