mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-28 19:49:20 +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)
|
||||
{
|
||||
// https://github.com/the-djmaze/snappymail/issues/1201
|
||||
$data = \stream_get_contents($fp);
|
||||
return static::createFromString($data);
|
||||
/*
|
||||
$imagick = new static();
|
||||
if (!$imagick->readImageFile($fp)) {
|
||||
throw new \InvalidArgumentException('Failed to load image');
|
||||
}
|
||||
$imagick->setImageMatte(true);
|
||||
return $imagick;
|
||||
*/
|
||||
}
|
||||
|
||||
public function getOrientation() : int
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue