1--TEST--
2Test Imagick, setImageArtifact
3--SKIPIF--
4<?php
5$imageMagickRequiredVersion=0x675;
6require_once(dirname(__FILE__) . '/skipif.inc');
7?>
8--FILE--
9<?php
10
11
12function setImageArtifact() {
13    $src1 = new \Imagick();
14    $src1->newPseudoImage(640, 480, "magick:logo");
15
16    $src2 = new \Imagick();
17    $src2->newPseudoImage(480, 640, "magick:WIZARD");
18
19    $src2->setImageVirtualPixelMethod(\Imagick::VIRTUALPIXELMETHOD_TRANSPARENT);
20    $src2->setImageArtifact('compose:args', "1,0,-0.5,0.5");
21    $src1->compositeImage($src2, Imagick::COMPOSITE_MATHEMATICS, 0, 0);
22
23    $src1->setImageFormat('png');
24    $bytes = $src1->getImagesBlob();
25    if (strlen($bytes) <= 0) { echo "Failed to generate image.";}
26}
27
28setImageArtifact() ;
29echo "Ok";
30?>
31--EXPECTF--
32Ok