mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-09-07 16:37:02 +03:00
Workaroung imagick improper image header #1201
This commit is contained in:
parent
1eb192db72
commit
99d68bc354
1 changed files with 5 additions and 0 deletions
|
|
@ -28,12 +28,17 @@ class IMagick extends \Imagick implements \SnappyMail\Image
|
||||||
|
|
||||||
public static function createFromStream($fp)
|
public static function createFromStream($fp)
|
||||||
{
|
{
|
||||||
|
// https://github.com/the-djmaze/snappymail/issues/1201
|
||||||
|
$data = \stream_get_contents($fp);
|
||||||
|
return static::createFromString($data);
|
||||||
|
/*
|
||||||
$imagick = new static();
|
$imagick = new static();
|
||||||
if (!$imagick->readImageFile($fp)) {
|
if (!$imagick->readImageFile($fp)) {
|
||||||
throw new \InvalidArgumentException('Failed to load image');
|
throw new \InvalidArgumentException('Failed to load image');
|
||||||
}
|
}
|
||||||
$imagick->setImageMatte(true);
|
$imagick->setImageMatte(true);
|
||||||
return $imagick;
|
return $imagick;
|
||||||
|
*/
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getOrientation() : int
|
public function getOrientation() : int
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue