1--TEST--
2Test compositeImageGravity
3--SKIPIF--
4<?php require_once(dirname(__FILE__) . '/skipif.inc');
5
6$v = Imagick::getVersion();
7if ($v['versionNumber'] < 0x693)
8	die ('skip too old ImageMagick');
9
10// if ($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$im1 = new Imagick("magick:logo");
17
18
19$im2 = new Imagick("magick:logo");
20
21$im2->scaleImage(
22	$im2->getImageWidth() / 2,
23	$im2->getImageHeight() / 2
24);
25
26$im1->compositeImageGravity(
27	$im2,
28	\Imagick::COMPOSITE_ATOP,
29	\Imagick::GRAVITY_NORTHEAST
30);
31
32$im1->compositeImageGravity(
33	$im2,
34	\Imagick::COMPOSITE_ATOP,
35	\Imagick::GRAVITY_SOUTH
36);
37
38// $im1->setImageFormat('png');
39// $im1->writeImage('compositeImageGravity.png');
40
41echo "Ok";
42
43?>
44--EXPECT--
45Ok