xref: /imagick/tests/006_cropthumbnail.phpt (revision 6958c016)
1--TEST--
2Test cropthumbnail
3--SKIPIF--
4<?php require_once(dirname(__FILE__) . '/skipif.inc'); ?>
5--FILE--
6<?php
7
8$im = new Imagick("magick:rose");
9$im->cropThumbnailImage(200, 200);
10var_dump($im->getImageGeometry());
11
12$im = new Imagick("magick:rose");
13$im->cropThumbnailImage(170, 120);
14var_dump($im->getImageGeometry());
15
16$im = new Imagick("magick:rose");
17$im->cropThumbnailImage(50, 50);
18var_dump($im->getImageGeometry());
19
20$im = new Imagick("magick:rose");
21$im->cropThumbnailImage(60, 120);
22var_dump($im->getImageGeometry());
23
24$im = new Imagick("magick:logo");
25$im->cropThumbnailImage(100, 100);
26var_dump($im->getImageGeometry());
27
28$im = new Imagick("magick:rose");
29$im->cropThumbnailImage(200, 10);
30var_dump($im->getImageGeometry());
31
32?>
33--EXPECTF--
34array(2) {
35  ["width"]=>
36  int(200)
37  ["height"]=>
38  int(200)
39}
40array(2) {
41  ["width"]=>
42  int(170)
43  ["height"]=>
44  int(120)
45}
46array(2) {
47  ["width"]=>
48  int(50)
49  ["height"]=>
50  int(50)
51}
52array(2) {
53  ["width"]=>
54  int(60)
55  ["height"]=>
56  int(120)
57}
58array(2) {
59  ["width"]=>
60  int(100)
61  ["height"]=>
62  int(100)
63}
64array(2) {
65  ["width"]=>
66  int(200)
67  ["height"]=>
68  int(10)
69}