Пример #1
0
 /**
  * Get image (& create if necessary)
  *
  * @return \Zork\Image\Image
  */
 protected function getImage($path = null)
 {
     if (is_null($this->image)) {
         if (is_null($path)) {
             $this->image = Image::create($this->width, $this->height);
         } else {
             $this->image = Image::open($path);
         }
     }
     return $this->image;
 }
Пример #2
0
 /**
  * Test render with unknown type
  *
  * @expectedException   Zork\Image\Exception\ExceptionInterface
  */
 public function testRenderWithUnknownType()
 {
     $image = Image::create(100, 100);
     $image->render('/tmp/~' . uniqid(), -1);
 }