Better perfomance to generate thumb from pdf
This commit is contained in:
parent
4f3dad4d04
commit
9f84111e16
|
@ -109,8 +109,10 @@ class Media {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
$imagick = new \Imagick($filepath);
|
$imagick = new \Imagick();
|
||||||
$imagick->setIteratorIndex(0);
|
$imagick->setResolution(72,72);
|
||||||
|
$imagick->readImage($filepath . '[0]');
|
||||||
|
//$imagick->setIteratorIndex(0);
|
||||||
$imagick->setImageFormat('jpg');
|
$imagick->setImageFormat('jpg');
|
||||||
return $imagick->getImageBlob();
|
return $imagick->getImageBlob();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue