1--TEST--
2Test Imagick, setImageBias
3--SKIPIF--
4<?php
5    require_once(dirname(__FILE__) . '/skipif.inc');
6    checkClassMethods('Imagick', array('setImageBias'));
7?>
8--FILE--
9<?php
10
11$bias = 0.5;
12
13//requires ImageMagick version 6.9.0-1 to have an effect on convolveImage
14function setImageBias($bias) {
15    $imagick = new \Imagick();
16    $imagick->newPseudoImage(640, 480, "magick:logo");
17
18    $xKernel = array(
19        -0.70, 0, 0.70,
20        -0.70, 0, 0.70,
21        -0.70, 0, 0.70
22    );
23
24    $imagick->setImageBias($bias * \Imagick::getQuantum());
25    $imagick->convolveImage($xKernel, \Imagick::CHANNEL_ALL);
26
27    $imagick->setImageFormat('png');
28
29    $bytes = $imagick->getImageBlob();
30    if (strlen($bytes) <= 0) { echo "Failed to generate image.";}
31}
32
33setImageBias($bias) ;
34echo "Ok";
35?>
36--EXPECTF--
37Deprecated: %s Imagick::setImageBias() is deprecated in %s
38Ok
39