GoLang Imagick::resampleImage

request it (252)
GoLang replacement for PHP's Imagick::resampleImage [edit | history]



Do you know a GoLang replacement for PHP's Imagick::resampleImage? Write it!

PHP Imagick::resampleImage

PHP original manual for Imagick::resampleImage [ show | php.net ]

Imagick::resampleImage

(PECL imagick 2.0.0)

Imagick::resampleImageResample 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(200200, \Imagick::FILTER_LANCZOS1);
    
header("Content-Type: image/jpg");
    echo 
$imagick->getImageBlob();
}

?>