Re: libpng error
| From: | Thalis A. Kalfigopoulos | Date: | Mon, 02 Apr 2001 16:01:55 +0000 |
| Subject: | Re: libpng error | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-46634@lists.php.net to get a copy of this message | ||
On Mon, 2 Apr 2001, Thalis A. Kalfigopoulos wrote:
> Thank you very much, really appreciate it. But I have to admit that I have an example from a
> book in which he creates a gif (and not a png), where he doesn't actually have to allocate a
> color. He only has 3 lines which are supposed to work. Maybe true for gif, but cannot tell, since I
> don't have gif support.
>
> header("Content-type: image/gif");
> $image= imagecreate(200,200)l
> imageRectangle($image, 50, 50, 150, 150, $blue);
Sorry mistake. 3-line code of example was:
header("Content-type: image/gif");
$image= imagecreate(200,200);
imagegif($image);
cheers,
thalis
> >
> > I make change of your code by move some line to correct line and it's
> > work.
> > Here this a code
> >
> > <?PHP
> > header("Content-type: image/png");
> > $image= imagecreate(200,200) or die("Failed in call to
> > imagecreate()<BR>\n");
> > $blue = imageColorAllocate($image,0,0,255);
> > imageRectangle($image, 50, 50, 150, 150, $blue);
> > imagepng($image); //---- I MOVE THIS LINE
> > imagedestroy($image);
> > ?>
> >
> > Hope this will help.
> > -Tuna-