(PECL imagick 2.0.0)
Imagick::setImageType — Sets the image type
$image_type
)Sets the image type.
image_type
成功时返回 TRUE
。
lee dot traynor at skeptic dot de (2011-10-19 13:37:24)
This function can be used to desaturate an image, i.e. to convert a coloured image into a greyscale:
<?php
$im = new Imagick ("image.jpg");
$im->setImageType (2);
//is now in 256 shades of grey
?>