mirror of
https://github.com/Intervention/image.git
synced 2025-08-29 16:50:07 +02:00
Merge pull request #1262 from Intervention/bugfix/coalesce-images-decoding-error
Fix decoding error with Imagick driver
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');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// For some JPEG formats, the "coalesceImages()" call leads to an image
|
||||||
|
// completely filled with background color. The logic behind this is
|
||||||
|
// incomprehensible for me; could be an imagick bug.
|
||||||
|
if ($imagick->getImageFormat() != 'JPEG') {
|
||||||
$imagick = $imagick->coalesceImages();
|
$imagick = $imagick->coalesceImages();
|
||||||
|
}
|
||||||
|
|
||||||
// fix image orientation
|
// fix image orientation
|
||||||
switch ($imagick->getImageOrientation()) {
|
switch ($imagick->getImageOrientation()) {
|
||||||
|
Reference in New Issue
Block a user