Esempio n. 1
0
 protected function _crop($x1, $y1, $x2, $y2)
 {
     extract(parent::_crop($x1, $y1, $x2, $y2));
     $image = '"' . $this->image_temp . '"';
     $this->exec('convert', $image . ' -crop ' . ($x2 - $x1) . 'x' . ($y2 - $y1) . '+' . $x1 . '+' . $y1 . ' +repage ' . $image);
     $this->clear_sizes();
 }
Esempio n. 2
0
 protected function _crop($x1, $y1, $x2, $y2)
 {
     extract(parent::_crop($x1, $y1, $x2, $y2));
     $width = $x2 - $x1;
     $height = $y2 - $y1;
     $this->debug("Cropping image " . $width . "x" . $height . "+{$x1}+{$y1} based on coords ({$x1}, {$y1}), ({$x2}, {$y2})");
     $this->imagick->cropImage($width, $height, $x1, $y1);
     $this->imagick->setImagePage(0, 0, 0, 0);
 }