PHP.nl

imageflip

imageflip

Flips an image using a given mode

true **imageflip** GdImage $image int $mode

Flips the image using the given . image``mode

mode Flip mode, this can be one of the constants: IMG_FLIP_*

return.true.always

Voorbeeld: Flips an image vertically

 This example uses the  
 constant.
`IMG_FLIP_VERTICAL`
<?php
// File
$filename = 'phplogo.png';

// Content type
header('Content-type: image/png');

// Load
$im = imagecreatefrompng($filename);

// Flip it vertically
imageflip($im, IMG_FLIP_VERTICAL);

// Output
imagejpeg($im);
?>

Voorbeeld: Flips the image horizontally

 This example uses the  constant.
`IMG_FLIP_HORIZONTAL`
<?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);
?>