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