mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-05-09 13:06:14 +00:00
conversion from pdf to png replaces alpha channel with white
This commit is contained in:
parent
73562364b0
commit
d45f050e46
|
@ -1,6 +1,7 @@
|
||||||
--------------------------------------------------------------------------------
|
--------------------------------------------------------------------------------
|
||||||
Changes in version 5.1.30
|
Changes in version 5.1.30
|
||||||
--------------------------------------------------------------------------------
|
--------------------------------------------------------------------------------
|
||||||
|
- conversion from pdf to png replaces alpha channel with white
|
||||||
|
|
||||||
--------------------------------------------------------------------------------
|
--------------------------------------------------------------------------------
|
||||||
Changes in version 5.1.29
|
Changes in version 5.1.29
|
||||||
|
|
|
@ -64,6 +64,10 @@ class SeedDMS_ConversionServicePdfToImage extends SeedDMS_ConversionServiceBase
|
||||||
if($imagick->readImage($infile.'['.$page.']')) {
|
if($imagick->readImage($infile.'['.$page.']')) {
|
||||||
if(!empty($params['width']))
|
if(!empty($params['width']))
|
||||||
$imagick->scaleImage(min((int) $params['width'], $imagick->getImageWidth()), 0);
|
$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->setImageFormat('png');
|
$imagick->setImageFormat('png');
|
||||||
$end = microtime(true);
|
$end = microtime(true);
|
||||||
if($this->logger) {
|
if($this->logger) {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user