Web Hosting Talk







View Full Version : PHP image generation and true type fonts


Umbongo
03-05-2003, 01:55 PM
PHP Manual
Col is the color index. Using the negative of a color index has the effect of turning off antialiasing.

How do I make a color negative?

Assuming im using the code
$white = ImageColorAllocate ($im, 255, 255, 255);
ImageTTFText ($im, 20, 0, 10, 20, $white, "/path/arial.ttf", "Testing... Omega: Ω");

Umbongo
03-06-2003, 01:25 PM
really need to be able to do this.

sasha
03-06-2003, 03:36 PM
Originally posted by Umbongo
How do I make a color negative?

Assuming im using the code
$white = ImageColorAllocate ($im, 255, 255, 255);
ImageTTFText ($im, 20, 0, 10, 20, $white, "/path/arial.ttf", "Testing... Omega: Ω");


Would it not be just
- $white
instead of
$white

Umbongo
03-06-2003, 03:56 PM
I wish it was. Doing that gives VERY strange results with tahoma and arial fonts.