HEX
Server: Apache
System: Linux sg241.singhost.net 2.6.32-896.16.1.lve1.4.51.el6.x86_64 #1 SMP Wed Jan 17 13:19:23 EST 2018 x86_64
User: honghock (909)
PHP: 8.0.30
Disabled: passthru,system,shell_exec,show_source,exec,popen,proc_open
Upload Files
File: //usr/local/lib/php/test/imagick/tests/008_newpseudoimage.phpt
--TEST--
Test pseudo formats
--SKIPIF--
<?php require_once(dirname(__FILE__) . '/skipif.inc'); ?>
--FILE--
<?php

$im = new Imagick();
$im->newPseudoImage(100, 100, "XC:red");
var_dump($im->getImageGeometry());

$im->newPseudoImage(0, 0, "magick:logo");
var_dump($im->getImageGeometry());

$im->readImage("magick:logo");
var_dump($im->getImageGeometry());

$im->newPseudoImage(0, 0, "rose:");
var_dump($im->getImageGeometry());

try { 
$im->newPseudoImage(0, 0, "png:");
var_dump($im->getImageGeometry());
} catch (Exception $e) {
	echo "fail\n";
}

?>
--EXPECTF--
array(2) {
  ["width"]=>
  int(%d)
  ["height"]=>
  int(%d)
}
array(2) {
  ["width"]=>
  int(%d)
  ["height"]=>
  int(%d)
}
array(2) {
  ["width"]=>
  int(%d)
  ["height"]=>
  int(%d)
}
array(2) {
  ["width"]=>
  int(%d)
  ["height"]=>
  int(%d)
}
fail