mirror of
https://github.com/Intervention/image.git
synced 2025-04-04 17:12:29 +02:00
Fix decoding error with Imagick driver
See: https://github.com/Intervention/image/issues/1261
This commit is contained in:
parent
f8c6f315a2
commit
1e4afd57cf
@ -29,7 +29,12 @@ class BinaryImageDecoder extends AbstractDecoder implements DecoderInterface
|
||||
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
|
||||
switch ($imagick->getImageOrientation()) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user