Re: Looking for a particular script

From: Date: Thu, 14 Sep 2000 05:29:22 +0000
Subject: Re: Looking for a particular script
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-16714@lists.php.net to get a copy of this message
Try this site on Web Monkey http://hotwired.lycos.com/webmonkey/99/25/index3a.html Wayne ----- Original Message ----- From: "Rasmus Lerdorf" <rasmus@php.net> To: "Shannon Doyle" <shannon@bigblue.net.au> Cc: <php-general@lists.php.net> Sent: Thursday, September 14, 2000 12:01 PM Subject: Re: [PHP] Looking for a particular script > > I once saw a php script that created graphics (buttons) by taking an image > > and then pasting (overlaying) text in a font over the top. This script was > > great for dynamically creating graphics for database queries and such. But > > for the life of me I cannot find it again. I kind of stumbled across it when > > I first found it, but I thought I would ask the list if they knew of the > > said script and if there was somewhere I could get it again. > > > > I believe that the script could display the text in any true type font that > > was avialable, as long as they were installed on the server. > > > > Any help would be great as I really need to create a series of images on the > > fly via a script such as this. > > It's pretty trivial to do. For example, this would draw white text in the > whatever.ttf font on the button.png background: > > Header("Content-type: image/png"); > $font = "whatever.ttf"; > $im = ImageCreateFromPNG("button.png"); > $black = ImageColorAllocate($im,0,0,0); > $white = ImageColorAllocate($im,255,255,255); > ImageTTFText($im, 12, 0, 5, 14, $white, $font, $text); > ImagePNG($im); > > You might want to add some logic to center the text. You are probably > referring to a phpbuilder article I wrote on this ages ago: > > http://www.phpbuilder.com/columns/rasmus19990124.php3 > > -Rasmus > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > For additional commands, e-mail: php-general-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net

« previous php.general (#16714) next »