文字

Imagick::setColorspace

(No version information available, might only be in Git)

Imagick::setColorspaceSet colorspace

说明

bool Imagick::setColorspace ( int $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(1000100);

$image->writeImage("output.jpg");

$image->clear();

?>

上一篇: 下一篇: