"MC" <madcow@false> wrote:
I'm currently making a website that needs to edit images with adding text,
the problem is, the picture starts at 300 DPI (pixels/inch), but after GD
edits the image, it's set to 72 which i read to be the default value GD
always uses. is there a way to edit that default to a higher number, if not
are there other ways to edit images through php and still keeping the
original DPI.
hi mc* !
here is an answer which I made here in May 2004
<cite>
first : sorry for my (very) bad english, but I'm french (and nobody's
perfect...)**
about picture :
picture is defined by X pixels x Y pixels (ie : 1200px x 856px).
on web (screen) this picture will fill a surface of 1200 pixels by 856
pixels.
but for printing it (on paper) you must calculate :
if you print at 300dpi (good offset), dimensions of your picture on
paper will be 1200/300 by 856/300 thus 4 inches by 2.8 inches ;
if you print at 135dpi (offset), dimensions of your picture on paper
will be 1200/3135 by 856/135 thus 8.9 inches by 6.3 inches.
and if you want a 12 inches by 8.6 inches picture on paper its
resolution will be 100dpi.
thus, you can know the quality of your final print just by knowing the
dimensions (in pixels) of your picture.
about gd :
when I create a jpeg image with gd, I always have a 72dpi image.
I use the php getimagesize function and I calculate :
round((getimagesize($my_picture)[0] * 0.85) / 100)
for width (cm) at 300dpi ;
round((getimagesize($my_picture)[1] * 0.85) / 100)
for height (cm) at 300dpi.
'et voila !'
</cite>
* here, in france, we have just had the first 'mad **goat**' !
what is a little worrying...
** this did not change !
--
@@@@@
E -00 yes ! france... near japan !
' `) /
|\_ =="