Re: image generation issues

From: Date: Tue, 12 Feb 2002 03:24:19 +0000
Subject: Re: image generation issues
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-84349@lists.php.net to get a copy of this message
tried everything suggested and still get 'could not read font' oh well thanx. ----- Original Message ----- From: "hugh danaher" <hdanaher@earthlink.net> To: "php" <php-general@lists.php.net> Sent: Tuesday, February 12, 2002 3:00 AM Subject: Re: [PHP] image generation issues > Adrian, > If you're using the code displayed, you need to use $im before you destroy > it. > If you want to deal with it as a .png then use: > ImagePNG($im,"some_name.png",100); > and then pick up the file anytime using > <img src="some_name.png"> > You can later remove it from the server using: > unlink("some_name.png"); > hope this helps. > Hugh > > ----- Original Message ----- > From: "Martin Towell" <martin.towell@world.net> > To: "'Adrian Murphy'" <adrian.murphy@2020tourism.com>; > <php-general@lists.php.net> > Sent: Monday, February 11, 2002 6:36 PM > Subject: RE: [PHP] image generation issues > > > > when you say it doesn't work, do you mean that you get an error message or > > it just doesn't write the text to the image? > > > > -----Original Message----- > > From: Adrian Murphy [mailto:adrian.murphy@2020tourism.com] > > Sent: Tuesday, February 12, 2002 1:16 PM > > To: php-general@lists.php.net > > Subject: [PHP] image generation issues > > > > > > Hi, > > I'm using the code in the manual to draw text on a png. > > but Its not working - ImageString() works but not ImageTTFText() > > I uploaded arial.ttf from windows to fonts/ folder > > Any Ideas: > > as a side note: PNG's - any real disadvantage to using them > > instead of gifs - not withstanding the compuserve issue and > > old browsers. > > > > the code > > button.php > > <?php > > Header ("Content-type: image/png"); > > $im = imagecreate (400, 30); > > $black = ImageColorAllocate ($im, 0, 0, 0); > > $white = ImageColorAllocate ($im, 255, 255, 255); > > ImageTTFText ($im, 20, 0, 10, 20, $white, "fonts/arial.ttf","Testing... > > Omega: &#937;"); > > ImagePng ($im); > > ImageDestroy ($im); > > ?> > > and i call it with > > <img src="button.php" border="0" alt=""> > > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php >

« previous php.general (#84349) next »