©
이 문서에서는 PHP 중국어 웹사이트 매뉴얼 풀어 주다
(No version information available, might only be in Git)
Imagick::setColorspace — Set colorspace
$COLORSPACE
)Sets the global colorspace value for the object. 此方法在Imagick基于ImageMagick 6.5.7以上版本编译时可用。
COLORSPACE
One of the COLORSPACE constants
成功时返回 TRUE
。
错误时抛出 ImagickException。
[#1] T [2014-12-28 21:20:19]
Right now this function doesn't appear to do anything, ref: http://stackoverflow.com/q/10739822/2685496
As mentioned in the answer, modulateImage works fine as a replacement for converting to gray scale.
<?php
$image = new Imagick("input.jpg");
$image->modulateImage(100, 0, 100);
$image->writeImage("output.jpg");
$image->clear();
?>