WP_Image_Editor_Imagick::thumbnail_image

Advertisement

Summery Summery

Efficiently resize the current image

Syntax Syntax

WP_Image_Editor_Imagick::thumbnail_image( int $dst_w, int $dst_h, string $filter_name = 'FILTER_TRIANGLE', bool $strip_meta = true )

Description Description

This is a WordPress specific implementation of Imagick::thumbnailImage(), which resizes an image to given dimensions and removes any associated profiles.

Parameters Parameters

$dst_w

(int) (Required) The destination width.

$dst_h

(int) (Required) The destination height.

$filter_name

(string) (Optional) The Imagick filter to use when resizing.

Default value: 'FILTER_TRIANGLE'

$strip_meta

(bool) (Optional) Strip all profiles, excluding color profiles, from the image.

Default value: true

Return Return

(bool|WP_Error)

Source Source

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


			

Advertisement

Changelog Changelog

Changelog
Version Description
4.5.0 Introduced.

Advertisement

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.