public function crop($wid, $hgt, $x = 0, $y = 0) { // Create a new image output resource. $this->resource->cropImage($wid, $hgt, $x, $y); $this->setImageInfo(); return $this; }
public function testCrop() { $i = new Imagick(__DIR__ . '/../tmp/test.jpg'); $i->crop(100, 50); $this->assertEquals(100, $i->getWidth()); }