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

pull/5284/head^2
Aleksander Machniak 8 years ago
parent 672ca96b24
commit 2f2765ab43

@ -25,6 +25,7 @@ CHANGELOG Roundcube Webmail
- Managesieve: Unhide advanced rule controls if there are inputs with errors
- Managesieve: Display warning message when filter form contains errors
- 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
-------------

@ -167,9 +167,15 @@ class rcube_image
try {
$image = new Imagick($this->image_file);
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