Php/docs/imagick.setimagebias
Imagick::setImageBias
(PECL imagick 2, PECL imagick 3)
Imagick::setImageBias — Sets the image bias for any method that convolves an image
Warning 此函数在 Imagick 3.4.4 中被 废弃,强烈建议不要应用此函数。
说明
public Imagick::setImageBias
( float $bias
) : bool
Sets the image bias for any method that convolves an image (e.g. Imagick::ConvolveImage()).
参数
bias
返回值
成功时返回 true
。
错误/异常
错误时抛出 ImagickException。
范例
Example #1 Imagick::setImageBias()
<?php//requires ImageMagick version 6.9.0-1 to have an effect on convolveImagefunction setImageBias($bias) { $imagick = new \Imagick(realpath("images/stack.jpg")); $xKernel = array( -0.70, 0, 0.70, -0.70, 0, 0.70, -0.70, 0, 0.70 ); $imagick->setImageBias($bias * \Imagick::getQuantum()); $imagick->convolveImage($xKernel, \Imagick::CHANNEL_ALL); $imagick->setImageFormat('png'); header('Content-type: image/png'); echo $imagick->getImageBlob();}?>