If you are familiar with Apple’s OSX system, you are probably familiar with the Dock. For those who do not see what it is, here is an example:

Apple Dock

On this Dock, you will have noticed that each icon is reflected as if on water or in a mirror. Even if this effect is easily reproducible with image processing software, it is not always easy to automate it on a whole set of images.

The example below shows a possible automation with the ImageMagick software.

#!/bin/sh
# reflect-image

gamma=$1
source=$2
destination=$3
size=`identify -format "%wx%h" $source`

convert $source ( -size $size xc:none  ( ( -flip $source -crop $size+0+0 ) \
-size $size gradient: -gamma $gamma \
-compose Copy_Opacity -composite ) \
-compose blend -composite ) \
-append $destination

The next command to run is :

reflect-image 0.4 source.png destination.png