在线文档教程
PHP
Image/ImageMagick

Imagick::resampleImage

Imagick::resampleImage

(PECL imagick 2.0.0)

Imagick::resampleImage — Resample image to desired resolution

Description

bool Imagick::resampleImage ( float $x_resolution , float $y_resolution , int $filter , float $blur )

Resample image to desired resolution.

Parameters

x_resolution y_resolution filter blur

Return Values

Returns TRUE on success.

Examples

Example #1 Imagick::resampleImage()

<?php function resampleImage($imagePath) {     $imagick = new \Imagick(realpath($imagePath)     $imagick->resampleImage(200, 200, \Imagick::FILTER_LANCZOS, 1     header("Content-Type: image/jpg"     echo $imagick->getImageBlob( } ?>

← Imagick::render

Imagick::resetImagePage →

© 1997–2017 The PHP Documentation Group

Licensed under the Creative Commons Attribution License v3.0 or later.

https://secure.php.net/manual/en/imagick.resampleimage.php