array ( 0 => 'index.php', 1 => 'PHP Manual', ), 'head' => array ( 0 => 'UTF-8', 1 => 'pt_BR', ), 'this' => array ( 0 => 'imagick.oilpaintimage.php', 1 => 'Imagick::oilPaintImage', ), 'up' => array ( 0 => 'class.imagick.php', 1 => 'Imagick', ), 'prev' => array ( 0 => 'imagick.normalizeimage.php', 1 => 'Imagick::normalizeImage', ), 'next' => array ( 0 => 'imagick.opaquepaintimage.php', 1 => 'Imagick::opaquePaintImage', ), 'alternatives' => array ( ), 'source' => array ( 'lang' => 'en', 'path' => 'reference/imagick/imagick/oilpaintimage.xml', ), ); $setup["toc"] = $TOC; $setup["toc_deprecated"] = $TOC_DEPRECATED; $setup["parents"] = $PARENTS; manual_setup($setup); ?>
(PECL imagick 2, PECL imagick 3)
Imagick::oilPaintImage — Simulates an oil painting
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.
radius
The radius of the circular neighborhood.
Retorna true
em caso de sucesso.
Exemplo #1 Imagick::oilPaintImage()
<?php
function oilPaintImage($imagePath, $radius) {
$imagick = new \Imagick(realpath($imagePath));
$imagick->oilPaintImage($radius);
header("Content-Type: image/jpg");
echo $imagick->getImageBlob();
}
?>