"Nitzan Tomer" <ni**********@g mail.comwrote in message
news:11******** *************@1 9g2000hsx.googl egroups.com...
hi everyone,
i created a script that outputs an image (transparent with text) based
on parameters passed by $_GET.
everything in my application works with 'pixels' and since GD2 this
function (imagettftext) uses 'points' as the text size unit.
i've searched everywhere for a solution to convert from pixels to
points (or the other way around) but with no luck... each place says
something different and i can't find a good answer.
any ideas of how to solve this?
thanks a lot!
nitzan.
Hi,
as far as I know pixels are for (computer) screens, and points are for
printing.
1 point (assuming Postscript) = 1/72 th of an inch
(
http://www.cl.cam.ac.uk/~mgk25/metric-typo/ )
How those relate depends on the resolution of the screen.
The resolution of your screen depends on the screen settings, and is not a
fixed value.
Some people assume 72 DPI for screen. Some OS's use 96 DPI. Most of the time
you can adjust DPI somewhere in computer settings. For Windows that used to
be for type only, not for images.
Basically it all means: there is no real way to convert between points and
pixels... because there is no general relationship between the two.
I usually try until things look good on as much screens I can try it on.
How is that for helping you? ;-)
Good luck,
Richard.