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(); }
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); }
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})"); $image = $this->create_transparent_image($width, $height); imagecopy($image, $this->image_data, 0, 0, $x1, $y1, $width, $height); $this->image_data = $image; }
protected function _crop($x1, $y1, $x2, $y2) { extract(parent::_crop($x1, $y1, $x2, $y2)); $this->imagick->cropImage($x2 - $x1, $y2 - $y1, $y1, $x1); }