When a user tries to upload an image in his profile, they get this error:

warning: imagecreatetruecolor() [function.imagecreatetruecolor]: Invalid image dimensions in C:\xampp\htdocs\maggotcorps\includes\image.gd.inc on line 95.
warning: imagecolorallocatealpha() expects parameter 1 to be resource, boolean given in C:\xampp\htdocs\maggotcorps\includes\image.gd.inc on line 97.
warning: imagealphablending() expects parameter 1 to be resource, boolean given in C:\xampp\htdocs\maggotcorps\includes\image.gd.inc on line 98.
warning: imagefilledrectangle() expects parameter 1 to be resource, boolean given in C:\xampp\htdocs\maggotcorps\includes\image.gd.inc on line 99.
warning: imagealphablending() expects parameter 1 to be resource, boolean given in C:\xampp\htdocs\maggotcorps\includes\image.gd.inc on line 100.
warning: imagesavealpha() expects parameter 1 to be resource, boolean given in C:\xampp\htdocs\maggotcorps\includes\image.gd.inc on line 101.
warning: imagecopyresampled() expects parameter 1 to be resource, boolean given in C:\xampp\htdocs\maggotcorps\includes\image.gd.inc on line 121.
warning: imagepng() expects parameter 1 to be resource, boolean given in C:\xampp\htdocs\maggotcorps\includes\image.gd.inc on line 215.
warning: imagedestroy() expects parameter 1 to be resource, boolean given in C:\xampp\htdocs\maggotcorps\includes\image.gd.inc on line 124.

And then a line in dutch(using the dutch language pack) say the file couldn't be uploaded because the image to to big, max size being 150*150, but the image is only 100*120.

I set max size to 150*150 and 250kb.

Anybody know what the problem is here?

Comments

EllECTRONC’s picture

The problem is in PHP 5.3 right? I have the same errors when working with some image modules and I'm still thinking what to do with this. Perhaps, we should submit an issue for D6 core.

Now that's looks so:
Drupal 9.19

imagecreatetruecolor() [<a href='function.imagecreatetruecolor'>function.imagecreatetruecolor</a>]: Invalid image dimensions в файле /../www/example.ru/includes/image.gd.inc в строке 95.

imagecolorallocatealpha() expects parameter 1 to be resource, boolean given в файле /../www/example.ru/includes/image.gd.inc в строке 97.

imagealphablending() expects parameter 1 to be resource, boolean given в файле /../www/example.ru/includes/image.gd.inc в строке 98.

imagefilledrectangle() expects parameter 1 to be resource, boolean given в файле /../www/example.ru/includes/image.gd.inc в строке 99.

imagealphablending() expects parameter 1 to be resource, boolean given в файле /../www/example.ru/includes/image.gd.inc в строке 100.

imagesavealpha() expects parameter 1 to be resource, boolean given в файле /../www/example.ru/includes/image.gd.inc в строке 101.

imagecopyresampled() expects parameter 1 to be resource, boolean given в файле /../www/example.ru/includes/image.gd.inc в строке 121.

imagepng() expects parameter 1 to be resource, boolean given в файле /../www/example.ru/includes/image.gd.inc в строке 215.

imagedestroy() expects parameter 1 to be resource, boolean given в файле /../www/example.ru/includes/image.gd.inc в строке 124.
seanray’s picture

I have met the same problem, and the php version is 5.2.12

theatereleven’s picture

This just started - really strange:

    * Warning: imagecreatetruecolor() [<a href='function.imagecreatetruecolor'>function.imagecreatetruecolor</a>]: Invalid image dimensions in imageapi_gd_create_tmp() (line 274 of /srv/www/my-site/sites/all/modules/imageapi/imageapi_gd.module).
    * Warning: imagecolorallocate(): supplied argument is not a valid Image resource in imageapi_gd_create_tmp() (line 298 of /srv/www/my-site/sites/all/modules/imageapi/imageapi_gd.module).
    * Warning: imagefill(): supplied argument is not a valid Image resource in imageapi_gd_create_tmp() (line 298 of /srv/www/my-site/sites/all/modules/imageapi/imageapi_gd.module).
    * Warning: imagecopyresampled(): supplied argument is not a valid Image resource in imageapi_gd_image_resize() (line 157 of /srv/www/my-site/sites/all/modules/imageapi/imageapi_gd.module).

It was working fine, I updated the core and some modules, and now this.

unc0nnected’s picture

Same problems here with php 5.3