1--TEST-- 2Test filling thumbnail with color 3--SKIPIF-- 4<?php require_once(dirname(__FILE__) . '/skipif.inc'); 5 6$v = Imagick::getVersion(); 7if ($v['versionNumber'] < 0x632) 8 die ('skip too old ImageMagick'); 9 10if ($v ['versionNumber'] >= 0x660 && $v ['versionNumber'] < 0x670) 11 die ('skip seems to be broken in this version of ImageMagick'); 12?> 13--FILE-- 14<?php 15 16$im = new Imagick("magick:logo"); 17$im->setImageBackgroundColor("pink"); 18$im->thumbnailImage(200, 200, true, true); 19 20$color = $im->getImagePixelColor(5, 5); 21if ($color->isPixelSimilar("pink", 0)) 22 echo "Similar" . PHP_EOL; 23else 24 var_dump ($color->getColorAsString()); 25 26$color = $im->getImagePixelColor(199, 5); 27if ($color->isPixelSimilar("pink", 0)) 28 echo "Similar" . PHP_EOL; 29else 30 var_dump ($color->getColorAsString()); 31?> 32--EXPECT-- 33Similar 34Similar