For Programmers: Free Programming Magazines  


Home > Archive > PHP Language > December 2006 > gd2









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author gd2
Harris Kosmidhs

2006-12-18, 3:58 am

Hello.
I want to use a captcha system for form validation.

The image created isn't displayd but rather says it contains errors.
Searching the code I found out that while ImageCreate works fine
imagecolorallocate doesn't

$image = ImageCreate($this -> width, $this -> height) or die("Cannot
Initialize new GD image stream");
$background_color = imagecolorallocate($image, 1, 2, 22) or die("Error
Image Allocate1");

the second func dies. phpinfo shown gd IS installed. Any help?

PS:($this->width,height are set correctly)
Harris Kosmidhs

2006-12-18, 7:59 am

Harris Kosmidhs wrote:
> Hello.
> I want to use a captcha system for form validation.
>
> The image created isn't displayd but rather says it contains errors.
> Searching the code I found out that while ImageCreate works fine
> imagecolorallocate doesn't
>
> $image = ImageCreate($this -> width, $this -> height) or die("Cannot
> Initialize new GD image stream");
> $background_color = imagecolorallocate($image, 1, 2, 22) or die("Error
> Image Allocate1");
>
> the second func dies. phpinfo shown gd IS installed. Any help?
>
> PS:($this->width,height are set correctly)


sorry ignore it.
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2009 codecomments.com