Better perfomance to generate thumb from pdf

This commit is contained in:
Leo Germani 2018-05-18 16:21:50 -03:00
parent 4f3dad4d04
commit 9f84111e16
1 changed files with 4 additions and 2 deletions

View File

@ -109,8 +109,10 @@ class Media {
return null;
}
$imagick = new \Imagick($filepath);
$imagick->setIteratorIndex(0);
$imagick = new \Imagick();
$imagick->setResolution(72,72);
$imagick->readImage($filepath . '[0]');
//$imagick->setIteratorIndex(0);
$imagick->setImageFormat('jpg');
return $imagick->getImageBlob();
}