This is a discussion on gd2 within the alt.comp.lang.php forums, part of the PHP Programming Forums category; Hello. I want to use a captcha system for form validation. The image created isn't displayd but rather says ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
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 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. |