1
1
Fork 0

Avoid error "Uncaught ImagickException: Unable to scale image"

This commit is contained in:
Michael 2021-03-23 20:01:32 +00:00
parent aaf94531a9
commit e6f4ed47e2

View file

@ -541,7 +541,12 @@ class Image
do { do {
// FIXME - implement horizontal bias for scaling as in following GD functions // FIXME - implement horizontal bias for scaling as in following GD functions
// to allow very tall images to be constrained only horizontally. // to allow very tall images to be constrained only horizontally.
$this->image->scaleImage($dest_width, $dest_height); try {
$this->image->scaleImage($dest_width, $dest_height);
} catch (Exception $e) {
// Imagick couldn't use the data
return false;
}
} while ($this->image->nextImage()); } while ($this->image->nextImage());
// These may not be necessary anymore // These may not be necessary anymore