Just realized I posted a bug fix in the old 3.5.x thread, meant to post it here.
Seems to be a bug with this addon and particular .gif files when you have the 'thumbnail' option set to yes.
One of my users have been trying to upload their signature file but it keeps timing out in PHP. I am using the latest build in GD version 2.0.28. Latest version of VB.
The problem code seems to be:
Code:
switch ($imageExt){
case (".gif"):
$srcImg = imagecreatefromgif("$imageDirectory/$imageName");
$colortrans = imagecolortransparent($srcImg);
$thumbImg = imagecreate($width, $height);
imagepalettecopy($thumbImg,$srcImg);
imagefill($thumbImg,0,0,$colortrans);
imagecolortransparent($thumbImg,$colortrans);
imagecopyresized($thumbImg,$srcImg,0,0,0,0,$width,$height,$imageWidth,$imageHeight);
imagegif($thumbImg,"$thumbDirectory/$thumbName");
This doesn't happen with all .gifs, just this particular one at the time. Its a 330x120 pixels gif thats 17kb in size.
I've been able to upload smaller and larger gifs though.
The Fix:
I did a search and discovered 2 of the functions you used in the code were older ones meant for the original GD library.
I changed 2 lines to refer to the GD2 libraries and now the .gif thumbnailing is working correctly.
Here's the updated code:
Code:
switch ($imageExt){
case (".gif"):
$srcImg = imagecreatefromgif("$imageDirectory/$imageName");
$colortrans = imagecolortransparent($srcImg);
$thumbImg = imagecreatetruecolor($width, $height);
imagepalettecopy($thumbImg,$srcImg);
imagefill($thumbImg,0,0,$colortrans);
imagecolortransparent($thumbImg,$colortrans);
imagecopyresampled($thumbImg,$srcImg,0,0,0,0,$width,$height,$imageWidth,$imageHeight);
imagegif($thumbImg,"$thumbDirectory/$thumbName");
break;
imagecreatetruecolor, and imagecopyresampled were the two functions I swapped in.
Hope this helps anyone else with this issue.