Answer the question
In order to leave comments, you need to log in
Why does Imagick crash when I try to resize an image?
Good morning.
Installed Imagick on a local xampp server like in the video:
The problem is that any Imagick functions I have tested work, but neither cropThumbnailImage(1080, 600) nor thumbnailImage(800, 800) does . What could be the problem? Even tried to catch an error through try catch, but there is no result.
Here is the whole code:
$image = $_SERVER['DOCUMENT_ROOT'].'/voland.png';
try {
$img = new Imagick($image);
$img->thumbnailImage(800, 800);
$img->writeImage($_SERVER['DOCUMENT_ROOT'].'/new_voland.png');
$img->clear();
$img->destroy();
} catch (Exception $e) {
var_dump($e);
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question