Merge branch 'seeddms-5.1.x' into seeddms-6.0.x

This commit is contained in:
Uwe Steinmann 2023-03-11 18:59:32 +01:00
commit 20686bccbd

View File

@ -66,6 +66,11 @@ class SeedDMS_ConversionServicePdfToImage extends SeedDMS_ConversionServiceBase
$imagick->scaleImage(min((int) $params['width'], $imagick->getImageWidth()), 0);
/* Remove alpha channel and set to white */
$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');