WordPress at a glance
function is not described

WP_Image_Editor_Imagick::save() public WP 3.5.0

Saves current image to file.

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

No Hooks.

Return

Array|WP_Error. {'path'=>string, 'file'=>string, 'width'=>int, 'height'=>int, 'mime-type'=>string}

Usage

$WP_Image_Editor_Imagick = new WP_Image_Editor_Imagick();
$WP_Image_Editor_Imagick->save( $destfilename, $mime_type );
$destfilename(string)
-
$mime_type(string)
-

Changelog

Since 3.5.0 Introduced.

Code of WP_Image_Editor_Imagick::save() WP 5.7.2

<?php
public function save( $destfilename = null, $mime_type = null ) {
	$saved = $this->_save( $this->image, $destfilename, $mime_type );

	if ( ! is_wp_error( $saved ) ) {
		$this->file      = $saved['path'];
		$this->mime_type = $saved['mime-type'];

		try {
			$this->image->setImageFormat( strtoupper( $this->get_extension( $this->mime_type ) ) );
		} catch ( Exception $e ) {
			return new WP_Error( 'image_save_error', $e->getMessage(), $this->file );
		}
	}

	return $saved;
}