title: Warning: imagecolorallocate() expects parameter 1 to be resource, boolean given
body: <p>When a customer tries to upload an jpg image in prestashop using my frontoffice product page I get this error:</p>
  
  <pre><code>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
  </code></pre>
  
  <p>The file source can be found here: <a href="http://pastebin.ca/2497875" rel="nofollow">http://pastebin.ca/2497875</a></p>
  
  <p>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 :/</p>
  
  <p>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)
  <a href="http://www.peciatky.sk/samonamacacie/11-printy-4910.html" rel="nofollow">http://www.peciatky.sk/samonamacacie/11-printy-4910.html</a></p>