Fixed Make error in thumbnail generation

This commit is contained in:
Michał Gdula 2022-09-12 14:30:57 +00:00
parent 92a1c3500e
commit b5375414bc
2 changed files with 4 additions and 6 deletions

View file

@ -12,12 +12,12 @@ class Make {
*/
function thumbnail($image_path, $thumbnail_path, $resolution) {
try {
$thumbnail = new Imagick($image_path);
$thumbnail = new \Imagick($image_path);
$thumbnail->resizeImage($resolution,null,null,1,null);
$thumbnail->writeImage($thumbnail_path);
return "success";
} catch (Exception $e) {
} catch (\Exception $e) {
return $e;
}
}