This example shows how to display and flip image in php gd.
This example shows how to display and flip image in php gd.<?php
$image = imagecreatefromjpeg("images.jpg"); $image = flip($image,1,1);header(
"Content-type: image/jpeg");imagejpeg(
$image);imagedestroy(
$image);imagecopy(
$temp,$i,0,0,0,0,$width,$height); if ($h==1) {imagecopy(
$i, $temp, $width-$x-1, 0, $x, 0, 1, $height);}
imagecopy(
$temp,$i,0,0,0,0,$width,$height);}
if($v==1) {imagecopy(
$i, $temp, 0, $height-$x-1, 0, $x, $width, 1);}
}
return $i;}
?>
After running the program you will get the following output