WordPress.org

Ready to get started?Download WordPress

Forums

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

  1. ZeroGravity
    Member
    Posted 1 year 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.

    http://wordpress.org/extend/plugins/random-image-gallery-with-pretty-photo-zoom/

  2. ZeroGravity
    Member
    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

About this Topic