Grafika\Imagick\Editor::flip PHP Method

flip() public method

Flip or mirrors the image.
public flip ( Image &$image, string $mode ) : Editor
$image Image
$mode string The type of flip: 'h' for horizontal flip or 'v' for vertical.
return Editor
    public function flip(&$image, $mode)
    {
        if ($mode === 'h') {
            $image->getCore()->flopImage();
        } else {
            if ($mode === 'v') {
                $image->getCore()->flipImage();
            } else {
                throw new \Exception(sprintf('Unsupported mode "%s"', $mode));
            }
        }
        return $this;
    }