[thelist] php on-the-fly image and text generation question

Tony Crockford tonyc at boldfish.co.uk
Sun Oct 13 18:04:01 CDT 2002


> Does anyone have any idea why some of the letters on this
> page are all blurry?
>
> http://www.1976design.com/testarea/photo/image.php
>
> It seems to happen only for letters in that space - that is
> if I deleted two
> letters from the start the blur will shift two letters to the right.

Aha!

you need to turn off antialiasing when you use a pixel font.

try adding a negative color index to the PHP array

array imagettftext ( resource image, int size, int angle, int x, int y,
int col, string fontfile, string text)

Col is the color index. Using the negative of a color index has the
effect of turning off antialiasing.

that should help

Tony




More information about the thelist mailing list