Workaroung imagick improper image header #1201

This commit is contained in:
the-djmaze 2023-07-11 10:24:50 +02:00
parent 1eb192db72
commit 99d68bc354

View file

@ -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