WordPress at a glance
function is not described

WP_Image_Editor_Imagick::update_size() protected WP 3.5.0

Sets or updates current image size.

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

No Hooks.

Return

true|WP_Error.

Usage

// protected - for code of main (parent) or child class
$result = $this->update_size( $width, $height );
$width(int)
-
$height(int)
-

Changelog

Since 3.5.0 Introduced.

Code of WP_Image_Editor_Imagick::update_size() WP 5.7.2

<?php
protected function update_size( $width = null, $height = null ) {
	$size = null;
	if ( ! $width || ! $height ) {
		try {
			$size = $this->image->getImageGeometry();
		} catch ( Exception $e ) {
			return new WP_Error( 'invalid_image', __( 'Could not read image size.' ), $this->file );
		}
	}

	if ( ! $width ) {
		$width = $size['width'];
	}

	if ( ! $height ) {
		$height = $size['height'];
	}

	return parent::update_size( $width, $height );
}