mirror of
https://git.code.sf.net/p/seeddms/code
synced 2024-11-26 15:32:13 +00:00
Merge branch 'seeddms-5.1.x' into seeddms-6.0.x
This commit is contained in:
commit
20686bccbd
|
@ -65,9 +65,14 @@ class SeedDMS_ConversionServicePdfToImage extends SeedDMS_ConversionServiceBase
|
|||
if(!empty($params['width']))
|
||||
$imagick->scaleImage(min((int) $params['width'], $imagick->getImageWidth()), 0);
|
||||
/* Remove alpha channel and set to white */
|
||||
$imagick->setImageBackgroundColor('white');
|
||||
$imagick->setImageAlphaChannel(Imagick::ALPHACHANNEL_REMOVE);
|
||||
$imagick->mergeImageLayers(Imagick::LAYERMETHOD_FLATTEN);
|
||||
$imagick->setImageBackgroundColor('white');
|
||||
/* Setting the color-type and bit-depth produces much smaller images
|
||||
* because the default depth appears to be 16 bit
|
||||
*/
|
||||
$imagick->setOption('png:color-type', 6);
|
||||
$imagick->setOption('png:bit-depth', 8);
|
||||
$imagick->setImageAlphaChannel(Imagick::ALPHACHANNEL_REMOVE);
|
||||
$imagick->mergeImageLayers(Imagick::LAYERMETHOD_FLATTEN);
|
||||
$imagick->setImageFormat('png');
|
||||
$end = microtime(true);
|
||||
if($this->logger) {
|
||||
|
|
Loading…
Reference in New Issue
Block a user