Re:GD, write text on image
| From: | Bernhard Döbler | Date: | Thu, 24 Apr 2003 07:14:57 +0000 |
| Subject: | Re:GD, write text on image | ||
| References: | 1 | Groups: | php.windows |
| Request: | Send a blank email to php-windows+get-19589@lists.php.net to get a copy of this message | ||
Hi Cam and Sven,
Thank you very much for your advises.
I confess, I parallelly asked this question on another list...
There I was given the tip to write the text in black even 8 times and once in white.
The random pixel-search is also an accaptable approach. I'll surely try both.
Server load is no problem since I'm not offering this service to customers but use it to
process my own pictures in one approach.
Best regards
Bernhard
----- Original Message -----
From: "Cam Dunstan" <cam@norex.com.au>
To: <php-windows@lists.php.net>
Sent: Thursday, April 24, 2003 1:10 AM
Subject: Re: AW: [PHP-WIN] GD, write text on image
here`s another trick you might like to try - place the text twice - once in black or dark grey then
again in white or very light grey a few pixels up and to the left. This will give you a crude drop
shadow effect and will be readable over virtually any background colour or mix of colours.
>> -----Ursprüngliche Nachricht-----
>> Von: Bernhard Döbler [SMTP:programmer@bardware.de]
>> Gesendet am: Mittwoch, 23. April 2003 16:36
>> An: php-windows@lists.php.net
>> Betreff: [PHP-WIN] GD, write text on image
>>
>> I'm going to write some text on an image. My problem is, if the
>background is to bright I cannot read the text if it's white. If I use
>black as the text-color I cannot read it, if the background is to dark.
>> Hence I'm looking for a way to either determine the darkest corner of the
>picture to write white text into (dimensions of the "corner" are counted by
>imagettfbbox), or a way to determine the brightness of the defined corner
>and dependend on the darkness use black or white text.
>>