public function blob($type = 'PNG') { $this->imagick->setImageFormat($type); echo $this->imagick->getImageBlob(); }