include the Zebra_Image library
require 'path/to/Zebra_Image.php';
instantiate the class
$img = new Zebra_Image();
a source image
$img->source_path = 'path/to/source.ext';
path to where should the resulting image be saved
note that by simply setting a different extension to the file will
instruct the script to create an image of that particular type
$img->target_path = 'path/to/target.ext';
flip the image both horizontally and vertically
$img->flip_both();