WordPress at a glance
function is not described

WP_Image_Editor_GD::update_size() protected WP 3.5.0

Sets or updates current image size.

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

No Hooks.

Return

true.

Usage

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

Default: false
$height(int)

Default: false

Changelog

Since 3.5.0 Introduced.

Code of WP_Image_Editor_GD::update_size() WP 5.5.2

<?php
protected function update_size( $width = false, $height = false ) {
	if ( ! $width ) {
		$width = imagesx( $this->image );
	}

	if ( ! $height ) {
		$height = imagesy( $this->image );
	}

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