1--TEST--
2Test Imagick, posterizeImage
3--SKIPIF--
4<?php require_once(dirname(__FILE__) . '/skipif.inc'); ?>
5--FILE--
6<?php
7
8$posterizeType = 2;
9$numberLevels = 8;
10
11function posterizeImage($posterizeType, $numberLevels) {
12    $imagick = new \Imagick();
13    $imagick->newPseudoImage(640, 480, "magick:logo");
14    $imagick->posterizeImage($numberLevels, $posterizeType);
15    $imagick->setImageFormat('png');
16    $bytes = $imagick->getImageBlob();
17    if (strlen($bytes) <= 0) { echo "Failed to generate image.";}
18}
19
20posterizeImage($posterizeType, $numberLevels) ;
21echo "Ok";
22?>
23--EXPECTF--
24Ok