Fix regression in resizing JPEG images with Imagick (#5376)

Conflicts:

	program/lib/Roundcube/rcube_image.php
pull/5754/head
Aleksander Machniak 8 years ago
parent 0ec486473b
commit 654d4e51fc

@ -2,6 +2,7 @@ CHANGELOG Roundcube Webmail
===========================
- Enigma: Add possibility to configure gpg-agent binary location (enigma_pgp_agent)
- Fix regression in resizing JPEG images with Imagick (#5376)
RELEASE 1.2.1
-------------

@ -166,10 +166,16 @@ class rcube_image
else {
try {
$image = new Imagick($this->image_file);
$image->setImageBackgroundColor('white');
$image->setImageAlphaChannel(11);
$image->mergeImageLayers(Imagick::LAYERMETHOD_FLATTEN);
try {
// it throws exception on formats not supporting these features
$image->setImageBackgroundColor('white');
$image->setImageAlphaChannel(11);
$image->mergeImageLayers(Imagick::LAYERMETHOD_FLATTEN);
}
catch (Exception $e) {
// ignore errors
}
$image->setImageColorspace(Imagick::COLORSPACE_SRGB);
$image->setImageCompressionQuality(75);

Loading…
Cancel
Save