mirror of
https://github.com/Intervention/image.git
synced 2025-08-30 09:10:21 +02:00
Merge pull request #730 from karim-hza/patch-1
Use imagecreatefromstring when imagecreatefromjpeg fail
This commit is contained in:
@@ -29,7 +29,10 @@ class Decoder extends \Intervention\Image\AbstractDecoder
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case IMAGETYPE_JPEG:
|
case IMAGETYPE_JPEG:
|
||||||
$core = @imagecreatefromjpeg($path);
|
$core = @imagecreatefromjpeg($path);
|
||||||
|
if (!$core) {
|
||||||
|
$core= @imagecreatefromstring(file_get_contents($path));
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case IMAGETYPE_GIF:
|
case IMAGETYPE_GIF:
|
||||||
|
Reference in New Issue
Block a user