(PECL imagick 2.0.0)
Imagick::resizeImage — Scales an image
$columns
, int $rows
, int $filter
, float $blur
[, bool $bestfit = false
] )Scales an image to the desired dimensions with a filter.
Note: 参数
bestfit的特性在 Imagick 3.0.0 中已改变. 在此版本以前, 当目标尺寸为400x400,尺寸为200x150的源图像将不会被改变. 自 Imagick 3.0.0 起, 源图像将会被放大到 400x300 因为这将更好的适合目标尺寸. 当使用参数bestfit时,必须同时给出宽度和高度
columns
Width of the image
rows
Height of the image
filter
Refer to the list of filter constants.
blur
The blur factor where > 1 is blurry, < 1 is sharp.
bestfit
Optional fit parameter.
成功时返回 TRUE .
| 版本 | 说明 |
|---|---|
| 2.1.0 | Added optional fit parameter. This method now supports proportional scaling. Pass zero as either parameter for proportional scaling. |