public function maybe_exif_rotate() { if ( is_callable( array
( $this->image, 'setImageOrientation'
) ) &&
defined( 'Imagick::ORIENTATION_TOPLEFT'
) ) { return parent::
maybe_exif_rotate();
} else { return new WP_Error( 'write_exif_error',
__( 'The image cannot be rotated because the embedded meta data cannot be updated.'
) );
} } /**
* Saves current image to file.
*
* @since 3.5.0
* @since 6.0.0 The `$filesize` value was added to the returned array.
*
* @param string $destfilename Optional. Destination filename. Default null.
* @param string $mime_type Optional. The mime-type. Default null.
* @return array|WP_Error {
* Array on success or WP_Error if the file failed to save.
*
* @type string $path Path to the image file.
* @type string $file Name of the image file.
* @type int $width Image width.
* @type int $height Image height.
* @type string $mime-type The mime type of the image.
* @type int $filesize File size of the image.
* }
*/