WP_Image_Editor_Imagick::resize

SummerySummery

Resizes current image.

Syntax

WP_Image_Editor_Imagick::resize( int|null $max_w, int|null $max_h, bool $crop = false )

DescriptionDescription

At minimum, either a height or width must be provided. If one of the two is set to null, the resize will maintain aspect ratio according to the provided dimension.

ParametersParameters

$max_w

(int|null) (Required) Image width.

$max_h

(int|null) (Required) Image height.

$crop

(bool) (Optional)

Default value: false

ReturnReturn

(bool|WP_Error)

SourceSource

File: wp-includes/class-wp-image-editor-imagick.php


			

ChangelogChangelog

Changelog
Version Description
3.5.0 Introduced.
Scroll to Top