$orientation =
apply_filters( 'wp_image_maybe_exif_rotate',
$orientation,
$this->file
);
if ( !
$orientation || 1 ===
$orientation ) { return false;
} switch ( $orientation ) { case 2:
// Flip horizontally.
$result =
$this->
flip( false, true
);
break;
case 3:
/*
* Rotate 180 degrees or flip horizontally and vertically.
* Flipping seems faster and uses less resources.
*/
$result =
$this->
flip( true, true
);
break;
case 4:
// Flip vertically.
$result =
$this->
flip( true, false
);