예제 #1
0
 public function testCrop()
 {
     $img = new Imaged(PNG_1);
     $img->fit(300, 300)->crop(200, 200, Imaged::CENTER, Imaged::CENTER)->write(tJPG);
     $img->restoreOriginal()->crop(200, 200, Imaged::CENTER, Imaged::CENTER)->fit(300, 300)->write(tPNG);
 }
예제 #2
0
 public function testSupportsGif()
 {
     $img = Imaged::create(GIF_1);
     $this->assertEquals(IMAGETYPE_GIF, $img->getType());
 }