WordPress at a glance
function is not described

WP_Image_Editor_GD::save() public WP 3.5.0

Saves current in-memory image to file.

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

No Hooks.

Return

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

Usage

$WP_Image_Editor_GD = new WP_Image_Editor_GD();
$WP_Image_Editor_GD->save( $filename, $mime_type );
$filename(string/null)

Default: null
$mime_type(string/null)

Default: null

Changelog

Since 3.5.0 Introduced.

Code of WP_Image_Editor_GD::save() WP 5.5.2

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

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

	return $saved;
}