Random image gallery with pretty photo zoom
Transparent PNG has black background (2 posts)

  1. ZeroGravity
    Posted 2 years ago #

    When the image is a transparent PNG crop-random-image.php returns an image that has a black background. I created a workaround by changing the code in select-random-image.php to just display the image, not call crop-random-image.php.


  2. ZeroGravity
    Posted 1 year ago #

    Apparently imagecreatefrompng doesn't work with a PNG image that has transparency. The following functions need to be added to preserve the transparency.

    imageAlphaBlending($src, true);
    imageSaveAlpha($src, true);

    I haven't tested it yet but this is what the Google searches reveal.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Random image gallery with pretty photo zoom
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic