Home:ALL Converter>Warning: imagecolorallocate() expects parameter 1 to be resource, boolean given

Warning: imagecolorallocate() expects parameter 1 to be resource, boolean given

Ask Time:2013-12-13T22:01:31         Author:Marek Andreansky

Json Formatter

When a customer tries to upload an jpg image in prestashop using my frontoffice product page I get this error:

Warning: imagecolorallocate() expects parameter 1 to be resource, boolean given in /var/www/peciatky/eshop/images.inc.php on line 255 
Warning: imagefilledrectangle() expects parameter 1 to be resource, boolean given in /var/www/peciatky/eshop/images.inc.php on line 256 
Warning: imagecopyresampled() expects parameter 1 to be resource, boolean given in /var/www/peciatky/eshop/images.inc.php on line 259 
Warning: imagejpeg() expects parameter 1 to be resource, boolean given in /var/www/peciatky/eshop/images.inc.php on line 336 
Warning: imagedestroy() expects parameter 1 to be resource, boolean given in /var/www/peciatky/eshop/images.inc.php on line 339

The file source can be found here: http://pastebin.ca/2497875

Honestly, I have been at this the whole night and could not find the solution to why this bugger is behaving this way. It's really annoying as I have a shop live and people not being able to upload images to orders is really bad :/

If you want to test the frontend here's the link to the store page that does not work, just try attaching a jpg or png file and click Ulozit (save) http://www.peciatky.sk/samonamacacie/11-printy-4910.html

Author:Marek Andreansky,eproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/20568381/warning-imagecolorallocate-expects-parameter-1-to-be-resource-boolean-given
yy