Imagick
在线手册:中文 英文
PHP手册

Imagick::setImageType

(PECL imagick 2.0.0)

Imagick::setImageTypeSets the image type

说明

bool Imagick::setImageType ( int $image_type )

Sets the image type.

参数

image_type

返回值

成功时返回 TRUE .


Imagick
在线手册:中文 英文
PHP手册
PHP手册 - N: Sets the image type

用户评论:

lee dot traynor at skeptic dot de (19-Oct-2011 09:37)

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

?>