Re: [PROPOSAL] Package 'ImageText'

From: Date: Thu, 09 Oct 2003 16:00:18 +0000
Subject: Re: [PROPOSAL] Package 'ImageText'
References: 1  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-22526@lists.php.net to get a copy of this message
Bertrand Mansion wrote:
<jeichorn@joshuaeichorn.com> wrote :
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. IMO, that's not the purpose of this class and therefore, I would be against your suggestions. Bertrand Mansion Mamasam Is there a class that does this in PEAR that this class could be integrated with, its seems very odd to have a nice OO class and then have to look up a bunch of GD functions to use it. -josh

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