mirror of
https://github.com/Imagick/imagick.git
synced 2026-06-21 16:45:45 +00:00
92408b5a65
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.
14 lines
290 B
PHP
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
|