1--TEST--
2Test Imagick, convolveImage
3--SKIPIF--
4<?php
5$imageMagickRequiredVersion=0x675;
6$imageMagickBelowVersion=0x700;
7require_once(dirname(__FILE__) . '/skipif.inc');
8?>
9--FILE--
10<?php
11
12$bias = 0.5;
13$kernelMatrix = array (
14  0 => -1,
15  1 => -1,
16  2 => -1,
17  3 => -1,
18  4 => 8,
19  5 => -1,
20  6 => -1,
21  7 => -1,
22  8 => -1,
23);
24
25function convolveImage($bias, $kernelMatrix) {
26    $imagick = new \Imagick();
27    $imagick->newPseudoImage(640, 480, "magick:logo");
28
29    //$edgeFindingKernel = [-1, -1, -1, -1, 8, -1, -1, -1, -1,];
30
31    $imagick->setImageBias($bias * \Imagick::getQuantum());
32    $imagick->convolveImage($kernelMatrix);
33    $bytes = $imagick->getImageBlob();
34    if (strlen($bytes) <= 0) { echo "Failed to generate image.";}
35}
36
37convolveImage($bias, $kernelMatrix) ;
38echo "Ok";
39?>
40--EXPECTF--
41Deprecated: %s Imagick::setImageBias() is deprecated in %s
42Ok
43