mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-05-13 21:21:27 +00:00
create 8-bit png instead of 16-bit
This commit is contained in:
parent
2e818d5426
commit
da992a7bdd
|
@ -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');
|
||||
|
|
Loading…
Reference in New Issue
Block a user