1--TEST--
2Test Imagick, trimImage
3--SKIPIF--
4<?php
5$imageMagickRequiredVersion=0x675;
6require_once(dirname(__FILE__) . '/skipif.inc');
7?>
8--FILE--
9<?php
10
11$color = 'rgb(39, 194, 255)';
12$fuzz = 0.1;
13
14function trimImage($color, $fuzz) {
15    $imagick = new \Imagick();
16    $imagick->newPseudoImage(640, 480, "magick:logo");
17
18    $imagick->borderImage($color, 10, 10);
19    $imagick->trimImage($fuzz * \Imagick::getQuantum());
20
21    $bytes = $imagick->getImageBlob();
22    if (strlen($bytes) <= 0) { echo "Failed to generate image.";}
23}
24
25trimImage($color, $fuzz) ;
26echo "Ok";
27?>
28--EXPECTF--
29Ok