1--TEST-- 2Test Imagick, distortImage 3--SKIPIF-- 4<?php 5$imageMagickRequiredVersion=0x675; 6require_once(dirname(__FILE__) . '/skipif.inc'); 7?> 8--FILE-- 9<?php 10 11$distortion = 1; 12 13 $imagick = new \Imagick(); 14 $imagick->newPseudoImage(640, 480, "magick:logo"); 15 $points = array( 16 0,0, 25,25, # top left 17 176,0, 126,0, # top right 18 0,135, 0,105, # bottom right 19 176,135, 176,135 # bottum left 20 ); 21 $imagick->setImageBackgroundColor("#fad888"); 22 $imagick->setImageVirtualPixelMethod( \Imagick::VIRTUALPIXELMETHOD_BACKGROUND ); 23 $imagick->distortImage( \Imagick::DISTORTION_BILINEAR, $points, TRUE ); 24 header( "Content-Type: image/jpeg" ); 25 $bytes = $imagick; 26 if (strlen($bytes) <= 0) { echo "Failed to generate image.";} 27 28echo "Ok"; 29?> 30--EXPECTF-- 31Ok