update : 2015.11.03
php.shukuma.com

검색:
 
 
Resample image to desired resolution

Imagick::resampleImage

(PECL imagick 2.0.0)

Imagick::resampleImageResample image to desired resolution

설명

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

Resample image to desired resolution.

인수

x_resolution

y_resolution

filter

blur

반환값

성공시에 TRUE를 반환합니다.

예제

Example #1 Imagick::resampleImage()

<?php
function resampleImage($imagePath) {
    
$imagick = new \Imagick(realpath($imagePath));

    
$imagick->resampleImage(200200, \Imagick::FILTER_LANCZOS1);
    
header("Content-Type: image/jpg");
    echo 
$imagick->getImageBlob();
}

?>