예제 #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
파일: ImageTest.php 프로젝트: gridguyz/zork
 /**
  * Test render with unknown type
  *
  * @expectedException   Zork\Image\Exception\ExceptionInterface
  */
 public function testRenderWithUnknownType()
 {
     $image = Image::create(100, 100);
     $image->render('/tmp/~' . uniqid(), -1);
 }