Exemplo n.º 1
0
 public function testCroppingWithFullBoxDetails()
 {
     $chain = new Chain();
     $chain->setRules([new Duplicate(), new Crop(["width" => 500, "height" => 250, "crop-box-width" => 640, "x" => 0, "y" => 0])]);
     $this->_runner->writeAs("top-crop-{NAME}-{W}")->process("5639.jpg", 100)->run($chain);
     $this->assertTrue(file_exists($this->_runner->getImage()->getFullPath()));
     list($width, $height) = getimagesize($this->_runner->getImage()->getFullPath());
     $this->assertEquals(500, $width);
     $this->assertEquals(250, $height);
 }
Exemplo n.º 2
0
 public function testRunnerOnJPGQualityOverride()
 {
     $runner = new ChainRunner();
     $runner->init($this->_basePath)->process("5639.jpg", 100);
     $this->assertEquals(100, $runner->getImage()->getJpgQuality());
 }