We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 17851
    • 213 Posts
    It looks like the MaxiGallery code does not support transparent PNG thumbs. Is this correct? Is there a workaround or does someone have a code sample I could insert to make this work? I’m aware of the PHP function "imagesavealpha" but I’m not real sure how to use it.
      Mark Macatee
      President
      Power 10 Solutions
      http://www.power10solutions.com
      • 7923
      • 4,213 Posts
      Have you tested them? I thought there was some support for transparency in the thumbnail class, but not sure. If you want it to work, see /assets/snippets/maxigallery/watermar/Thumbnail.class.php


        "He can have a lollipop any time he wants to. That's what it means to be a programmer."
        • 17851
        • 213 Posts
        Yeah, I looked at that and didn’t see any code that enabled thumbnail transparency, only watermark transparency. At any rate, I think I was able to add the following in the process() function:

        if ($gd_version>=2) {
        //if (false) {
        $this->img["des"] = ImageCreateTrueColor($X_des,$Y_des);
        //--Inserted code---
        imagealphablending($this->img["des"], false);
        imagesavealpha($this->img["des"], true);

        That seems to work now.
          Mark Macatee
          President
          Power 10 Solutions
          http://www.power10solutions.com
          • 7923
          • 4,213 Posts
          Great, good job!


            "He can have a lollipop any time he wants to. That's what it means to be a programmer."