5 use \Intervention\Image\Image;
6 use \Intervention\Image\Size;
22 $core->readImage(
$path);
23 $core->setImageType(\Imagick::IMGTYPE_TRUECOLORMATTE);
25 }
catch (\ImagickException $e) {
26 throw new \Intervention\Image\Exception\NotReadableException(
27 "Unable to read image from path ({$path})."
33 $image->setFileInfoFromPath(
$path);
46 throw new \Intervention\Image\Exception\NotSupportedException(
47 'Imagick driver is unable to init from GD resource.'
61 $object = $this->removeAnimation($object);
64 $object->setImageOrientation(\Imagick::ORIENTATION_UNDEFINED);
81 $core->readImageBlob($binary);
83 }
catch (\ImagickException $e) {
84 throw new \Intervention\Image\Exception\NotReadableException(
85 "Unable to read image from binary data."
91 $image->mime = finfo_buffer(finfo_open(FILEINFO_MIME_TYPE), $binary);
103 private function removeAnimation(\Imagick $object)
105 $imagick = new \Imagick;
107 foreach ($object
as $frame) {
108 $imagick->addImage($frame->getImage());