2020-05-02 / 3976阅 / 悠然
Retrieves calculated resize dimensions for use in WP_Image_Editor.
Calculates dimensions and coordinates for a resized image that fits within a specified width and height.
Cropping behavior is dependent>
(int)
(Required)
Original width in pixels.
(int)
(Required)
Original height in pixels.
(int)
(Required)
New width in pixels.
(int)
(Required)
New height in pixels.
(bool|array)
(Optional)
Whether to crop image to specified width and height or resize. An array can specify positioning of the crop area.
Default value: false
(array|false) Returned array matches parameters for imagecopyresampled(). False on failure.