Fix Object of class Imagick could not be converted to string

Implements direct to memory image formats. It returns the image sequence as a string. The format of the image determines the format of the returned blob (GIF, JPEG, PNG, etc.). To return a different image format, use Imagick::setImageFormat().
Fixed Object of class Imagick could not be converted to string
Fixed Object of class Imagick could not be converted to string
Merge pull request #3406 from eXprojects/patch-1

Fix Object of class Imagick could not be converted to string