flip

Flip an image.

flip ( ImageInterface &$image, string $mode ): EditorInterface 
Parameters
image

Instance of Image.

mode

The type of flip: 'h' for horizontal flip or 'v' for vertical.

Returns
An instance of Editor.
Examples
use Grafika\Grafika; // Import package

//...

$editor->open( $image, 'test.jpg' );
$editor->flip( $image, 'h' ); // Flip horizontally
$editor->save( $image, 'flipH.jpg' );
$editor->flip( $image, 'v' ); // Flip vertically
$editor->save( $image, 'flipV.jpg' );

Test image:
lena

Flip horizontally:
flip

Flip vertically:
flip