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
?>
Imagick::setImageType
(PECL imagick 2.0.0)
Imagick::setImageType — 画像の型を設定する
説明
bool Imagick::setImageType
( int
$image_type
)画像の型を設定します。
パラメータ
-
image_type -
返り値
成功した場合に TRUE を返します。
lee dot traynor at skeptic dot de ¶
1 year ago
