WordPress at a glance
function is not described

WP_Image_Editor_Imagick::flip() public WP 3.5.0

Flips current image.

{} It's a method of the class: WP_Image_Editor_Imagick{}

No Hooks.

Return

true|WP_Error.

Usage

$WP_Image_Editor_Imagick = new WP_Image_Editor_Imagick();
$WP_Image_Editor_Imagick->flip( $horz, $vert );
$horz(true|false) (required)
Flip along Horizontal Axis
$vert(true|false) (required)
Flip along Vertical Axis

Changelog

Since 3.5.0 Introduced.

Code of WP_Image_Editor_Imagick::flip() WP 5.7.2

<?php
public function flip( $horz, $vert ) {
	try {
		if ( $horz ) {
			$this->image->flipImage();
		}

		if ( $vert ) {
			$this->image->flopImage();
		}

		// Normalise EXIF orientation data so that display is consistent across devices.
		if ( is_callable( array( $this->image, 'setImageOrientation' ) ) && defined( 'Imagick::ORIENTATION_TOPLEFT' ) ) {
			$this->image->setImageOrientation( Imagick::ORIENTATION_TOPLEFT );
		}
	} catch ( Exception $e ) {
		return new WP_Error( 'image_flip_error', $e->getMessage() );
	}

	return true;
}