HomeImagickImagickDrawImagickPixelImagick Pixel IteratorImagick KernelDevelopmentTutorial Source codeReport an issue
Category
Example

Imagick::oilPaintImage

← normalizeImage   opaquePaintImage →
Applies a special effect filter that simulates an oil painting. Each pixel is replaced by the most frequent color occurring in a circular region defined by radius.

Example

function oilPaintImage($image_path, $radius)
{
    $imagick = new \Imagick(realpath($image_path));
    $imagick->oilPaintImage($radius);
    header("Content-Type: image/jpeg");
    echo $imagick->getImageBlob();
}