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