Files
imagick/tests/github_174.phpt
Danack 92408b5a65 Prevent resizing an image to 0 width/height.
ImageMagick does not support zero width/height images. Some places where images could be created with zero width/height are protected by ImageMagick e.g. Imagick::newPseudoImage(). Other places need to be protected by Imagick. I'm about 50% sure this is the correct thing to do, rather than throwing an ImagickException. Fixes #174.
2016-12-06 18:46:43 +00:00

14 lines
290 B
PHP

--TEST--
Imagick::resizeImage prevent 0 width/height images
--SKIPIF--
<?php require_once(dirname(__FILE__) . '/skipif.inc'); ?>
--FILE--
<?php
$i = new Imagick;
$i->newPseudoImage(1, 1000, "xc:red");
$i->resizeImage(0, 250, 0, 1);
echo $i->getImageWidth(); // should be 1
?>
--EXPECTF--
1