array ( 0 => 'index.php', 1 => 'PHP Manual', ), 'head' => array ( 0 => 'UTF-8', 1 => 'fr', ), 'this' => array ( 0 => 'imagick.statisticimage.php', 1 => 'Imagick::statisticImage', ), 'up' => array ( 0 => 'class.imagick.php', 1 => 'Imagick', ), 'prev' => array ( 0 => 'imagick.spreadimage.php', 1 => 'Imagick::spreadImage', ), 'next' => array ( 0 => 'imagick.steganoimage.php', 1 => 'Imagick::steganoImage', ), 'alternatives' => array ( ), 'source' => array ( 'lang' => 'en', 'path' => 'reference/imagick/imagick/statisticimage.xml', ), ); $setup["toc"] = $TOC; $setup["toc_deprecated"] = $TOC_DEPRECATED; $setup["parents"] = $PARENTS; manual_setup($setup); ?>
(PECL imagick 3 >= 3.3.0)
Imagick::statisticImage — Modifies image using a statistics function
$type
,$width
,$height
,$channel
= Imagick::CHANNEL_DEFAULTReplace each pixel with corresponding statistic from the neighborhood of the specified width and height.
type
width
height
channel
Retourne true
en cas de succès.
Exemple #1 Imagick::statisticImage()
<?php
function statisticImage($imagePath, $statisticType, $width, $height, $channel) {
$imagick = new \Imagick(realpath($imagePath));
$imagick->statisticImage(
$statisticType,
$width,
$height,
$channel
);
header("Content-Type: image/jpg");
echo $imagick->getImageBlob();
}
statisticImage($imagePath, \Imagick::STATISTIC_MEDIAN, 5, 5, \Imagick::CHANNEL_DEFAULT);
?>