mirror of
https://github.com/Intervention/image.git
synced 2025-08-08 06:46:33 +02:00
Fix decoding error with Imagick driver
See: https://github.com/Intervention/image/issues/1261
This commit is contained in:
@@ -29,7 +29,12 @@ class BinaryImageDecoder extends AbstractDecoder implements DecoderInterface
|
|||||||
throw new DecoderException('Unable to decode input');
|
throw new DecoderException('Unable to decode input');
|
||||||
}
|
}
|
||||||
|
|
||||||
$imagick = $imagick->coalesceImages();
|
// For some JPEG formats, the "coalesceImages()" call leads to an image
|
||||||
|
// completely filled with background color. The logic behind this is
|
||||||
|
// incomprehensible; could be an imagemagick bug.
|
||||||
|
if ($imagick->getImageFormat() != 'JPEG') {
|
||||||
|
$imagick = $imagick->coalesceImages();
|
||||||
|
}
|
||||||
|
|
||||||
// fix image orientation
|
// fix image orientation
|
||||||
switch ($imagick->getImageOrientation()) {
|
switch ($imagick->getImageOrientation()) {
|
||||||
|
Reference in New Issue
Block a user