Okay, I’ve made some progress. Right now, it
only works for
gifs, and it
only works for the
actual image (not the thumbnail).
I did it by changing the function that converts GIFs to PNGs. Go to line 406 in maxigallery.class.inc.php, and change
$dest=imagecreate($src_size[0],$src_size[1]);
to
$dest=imagecreate($src_size[0],$src_size[1]);
//attempt transparency in final PNG (not thumbnail)
imagecolortransparent($dest,imagecolorallocate($dest, 0, 0, 0));
imagealphablending($dest,false);
imagesavealpha($dest,true);
If I make more progress, I will post. Next step is to recreate this in the Thumbnail.class.php file, which will fix the thumbnail. Also, I currently would not expect this to work for an already transparent .PNG file, since there’s probably a separate area for preprocessing those. Perhaps the author can help a little bit, since it seems the code to maintain transparency is simple. I’m not much of a PHP guy myself, so it’s not easy for me to find the right spots to use the code. Little fixes sometimes take me lots of research time
EDIT: PNGs upload with transparency intact, but no matter what i do, I cannot get the thumbnails to have transparent backgrounds. I wonder if doze has any insight?