Re: [PROPOSAL] Package 'ImageText'

From: Date: Thu, 09 Oct 2003 15:43:19 +0000
Subject: Re: [PROPOSAL] Package 'ImageText'
References: 1 2 3  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-22523@lists.php.net to get a copy of this message
Tobias Schlitt wrote:
Am Thursday, October 09, 2003 1:32 AM [GMT+0100=CET], artikulierte Joshua Eichorn <jeichorn@joshuaeichorn.com>:
I like the output looks like a good start. There are a coupel things i would like added
Some helper methods so you didn't have to use the gd methods directly unless you needed the extra power.
Sorry, what do you mean with that? A method to handle the function calls below:
| $img = imagecreate('500', '200'); $white = imagecolorallocate($img, 255, 255, 255); $black = imagecolorallocate($img, 0, 0, 0);
         imagefill($img, 0, 0, $white);
imagerectangle($img, 0, 0, 499, 199, $black); imagerectangle($img, 45, 95, 355, 155, $black); $test->toImage($img, 50, 100); //var_dump($test); header("Content-type: image/png"); imagepng($img); imagedestroy($img); ||Just so in the basic case where you wanted to create an image with some text you could do $test->setBackgroud(||255, 255, 255);| |$test->imageDisplay(); And that would do the imagepng, imagedestory calls etc as well as setting the header. Maybe it would be better just to show an example of using this with another class that handled creating images but i don't know if one exists, i know its never a good idea to put unrelated functionality in a class but it would be nice to be able to create the image with just the api from the class. -josh|

« previous php.pear.dev (#22523) next »