This example uses the IMG_FLIP_HORIZONTAL
constant.
<?php
// File
$filename = 'phplogo.png';
// Content type
header('Content-type: image/png');
// Load
$im = imagecreatefrompng($filename);
// Flip it horizontally
imageflip($im, IMG_FLIP_HORIZONTAL);
// Output
imagejpeg($im);
imagedestroy($im);
?>
The above example will output
something similar to: