Core PHP
Easy PHP Reflections v3.0 & v2.1
Core PHP
Blog: CorePHP Blog     Current Projects: PHP on XP Guide  —  NFO Viewer  —  Easy Reflections  —  HotWire  —  FileGlider

Updated 5th January 2008

Easy Reflections

Easy Reflections is a PHP script that takes an image and then creates a reflection of it. A 'reflection' being in the Apple OSX style as seen in iTunes. This is also known as a 'wet floor'.

Pick your version

There are two versions of Easy Reflections and both are maintained independantly of each other. Version 3 contains advanced features only suitable for modern browsers.

Version 3

V3 creates the reflection by outputting a PNG image using alpha transparency levels. The end result is beautifully smooth and the reflection can be overlaid on any background and can even be colour tinted. However the visitors browser must be able to display PNG images with Alpha Transparency - which for example IE5 doesn't.

Version 2.1

V2 creates the reflection by outputting either a PNG or a JPEG image, and doesn't use alpha transparency to achieve the effect (the mirror reflection is all created with a simple GD trick inside the PHP script). You can only set a background colour to fade the reflection into, but it works on any web browser that can display images!


Both versions support creating reflections from GIF, JPG or PNG source files. Both versions support image caching, variable heights and control over the fade levels used. The choice really is down to end-user compatibility.

Easy Reflections was written and tested with PHP 4.4.5 and PHP 5.2.3. It is fully compatible with E_ALL and Register Globals Off. It requires that PHP has GD extension 2.0.1+ loaded.

© Copyright 2007 - 2008, Richard Davey