Results 1 to 1 of 1

Thread: Combining the Fade-in slideshow with a reflection effect

  1. #1
    Join Date
    Apr 2011
    Thanked 0 Times in 0 Posts

    Question Combining the Fade-in slideshow with a reflection effect

    1) Script Title: Ultimate Fade-in slideshow (v2.0)

    2) Script URL (on DD):

    3) Describe the question: Is it somehow possible, to add a reflection effect to the images used in a slideshow (based on javascript, e.g reflection.js or on PHP)?

    Many thanks for your appreciated support!


    SUCCESS! I found a solution (PHP based):

    1. I used this PHP script from and added the following code in line 355 (in order to merge the original image and the reflection in one single image):

    PHP Code:
        if (isset($_GET['merge']) && $_GET['merge'] == true) { 
    $merged_output imagecreatetruecolor($width$new_height $height);
    imagesavealpha($merged_outputtrue); // Copy the source image
    imagecopy($merged_output$source0000$width$height); // Copy our new reflection
    imagecopy($merged_output$output0$height00$widthimagesy($output)); // Replace the output with this new version
    $output $merged_output; } 
    Source: (Comment #4 by James)

    2. I then put the PHP file in the same directory as the images and called the images in the Ultimate Fade In Slideshow JS array as follows:

    var mygallery=new fadeSlideShow({
    	wrapperid: "slideshow", //ID of blank DIV on page to house Slideshow
    	dimensions: [960, 478], //width/height of gallery in pixels. Should reflect dimensions of largest image
    	imagearray: [
    		["/path/to/images/slideshow/reflect.php?img=image.jpg&merge=true&fade_start=50&cache=1", "/url", "", "Title"],
    It works quite good, however there is an increased load on the webserver. The loading of the images may get a bit delayed, you can prevent this with the caching option of this PHP script.

    Last edited by gemini84; 04-19-2011 at 10:44 PM.


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts