HomeImagickImagickDrawImagickPixelImagick Pixel IteratorImagick KernelDevelopmentTutorial Source codeReport an issue
Category
Example

Imagick::resampleImage

← remapImage   resizeImage →
Resample image to desired resolution.

Example

function resampleImage($image_path)
{
    $imagick = new \Imagick(realpath($image_path));

    $imagick->resampleImage(200, 200, \Imagick::FILTER_LANCZOS, 1);
    header("Content-Type: image/jpeg");
    echo $imagick->getImageBlob();
}