lfiore/upld

Error on non transparent gif

Closed this issue · 1 comments

Warning: imagecopyresized() expects parameter 1 to be resource, integer given in /var/www/html/upld/inc/moderate.php on line 148

Warning: imagejpeg() expects parameter 1 to be resource, integer given in /var/www/html/upld/inc/moderate.php on line 151

Warning: imagedestroy() expects parameter 1 to be resource, integer given in /var/www/html/upld/inc/moderate.php on line 152

file inc/moderate.php line# 143
$new_thumb = imagecolorallocate($thumb, 0, 0, 0);
imagecolortransparent($thumb, $new_thumb);

to
if (imagecolortransparent($thumb) <> -1)
{
$new_thumb = imagecolorallocate($thumb, 0, 0, 0);
imagecolortransparent($thumb, $new_thumb);
}

Ended up removing that. Not sure why I even bothered with that since the thumbnails are saved as a jpg anyway.

They're only there to give a general idea of what the image is, and take up little space so I didn't bother converting thumbnails to PNG.

Thanks for reporting.