Analyzes the colors within a reference image.What it does in practice is reduce the number of colors in an image.
In a dithered image, colors not available in the palette are approximated by a diffusion of colored pixels from within the available palette. The human eye perceives the diffusion as a mixture of the colors within it (see color vision). Dithering is analogous to the halftone technique used in printing. Dithered images, particularly those with relatively few colors, can often be distinguished by a characteristic graininess, or speckled appearance.
<?php
$image = new Imagick("opossum.jpg");
$image->quantizeImage(15, imagick::COLORSPACE_RGB, 5, FALSE, TRUE);
header('Content-type: image/jpeg');
echo $image;
?>
|
|
|