Results 1 to 1 of 1

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

  1. #1
    Join Date
    Apr 2011
    Posts
    1
    Thanks
    0
    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): http://www.dynamicdrive.com/dynamici...nslideshow.htm

    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!


    EDIT
    -------

    SUCCESS! I found a solution (PHP based):

    1. I used this PHP script from http://reflection.corephp.co.uk/v3.php 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);
        
    imagealphablending($merged_outputfalse);
        
    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: http://www.corephp.co.uk/archives/48...-Released.html (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:

    Code:
    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.

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

Bookmarks

Posting Permissions

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