Skip to content

Commit

Permalink
[jan] Fix generating PDF thumbnails with imagick extension 3.3.0+ (ar…
Browse files Browse the repository at this point in the history
…jen+horde@de-korte.org, Bug #14697).
  • Loading branch information
yunosh committed Sep 25, 2017
1 parent f8f0f21 commit c50c320
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 2 deletions.
3 changes: 2 additions & 1 deletion imp/lib/Mime/Viewer/Pdf.php
Expand Up @@ -133,8 +133,9 @@ protected function _getHordeImageOb($load)
if ($img instanceof Horde_Image_Imagick) {
/* Get rid of PDF transparency. */
$img->imagick->setImageBackgroundColor('white');
$img->imagick->setImageAlphaChannel(imagick::ALPHACHANNEL_REMOVE);
return $GLOBALS['injector']->getInstance('Horde_Core_Factory_Image')->create(array(
'data' => $img->imagick->flattenImages()->getImageBlob()
'data' => $img->imagick->mergeImageLayers(imagick::LAYERMETHOD_FLATTEN)->getImageBlob()
));
}

Expand Down
15 changes: 14 additions & 1 deletion imp/package.xml
Expand Up @@ -4023,12 +4023,25 @@
<stability>
<release>stable</release>
<api>stable</api></stability>
<date>2017-08-01</date>
<date>2017-09-19</date>
<license uri="http://www.horde.org/licenses/gpl">GPL-2.0</license>
<notes>
* [jan] Officially support PHP 7.
</notes>
</release>
<release>
<version>
<release>6.2.22</release>
<api>6.2.0</api></version>
<stability>
<release>stable</release>
<api>stable</api></stability>
<date>2017-09-19</date>
<license uri="http://www.horde.org/licenses/gpl">GPL-2.0</license>
<notes>
* [jan] Fix generating PDF thumbnails with imagick extension 3.3.0+ (arjen+horde@de-korte.org, Bug #14697).
</notes>
</release>
<release>
<date>2016-12-05</date>
<version>
Expand Down

0 comments on commit c50c320

Please sign in to comment.