1--TEST-- 2Test Imagick, fxImage 3--SKIPIF-- 4<?php 5$imageMagickRequiredVersion=0x675; 6require_once(dirname(__FILE__) . '/skipif.inc'); 7checkFormatPresent('png'); 8?> 9--FILE-- 10<?php 11 12 13function fxImage() { 14 $imagick = new \Imagick(); 15 $imagick->newPseudoImage(200, 200, "xc:white"); 16 17 $fx = 'xx=i-w/2; yy=j-h/2; rr=hypot(xx,yy); (.5-rr/140)*1.2+.5'; 18 $fxImage = $imagick->fxImage($fx); 19 20 $fxImage->setimageformat('png'); 21 $bytes = $fxImage->getImageBlob(); 22 if (strlen($bytes) <= 0) { echo "Failed to generate image.";} 23} 24 25fxImage() ; 26echo "Ok"; 27?> 28--EXPECTF-- 29Ok