Maybe you don't need to setImageFormat?

http://php.net/manual/en/imagick.readimage.php