Пример #1
0
 /**
  * @param Image $image
  * @param int $format
  */
 public function __construct(Image $image, $format)
 {
     parent::__construct($image->get($format), 200, ['Content-type' => 'image/' . $format]);
 }
Пример #2
0
 /**
  * Returns the image resource in the given format.
  */
 public function get($format = 'png')
 {
     $this->create();
     return $this->image->get($format);
 }