Advertisement
Guest User

Crop

a guest
Sep 18th, 2010
142
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.59 KB | None | 0 0
  1. $original = $this->config->basePath .'images/gallery/original/' . $imageId . '.jpg';
  2. $image_width_lge = 700;
  3. $image_height_lge = 340;
  4. $image_quality_lge = 75;
  5. $image_loc_lge = $this->config->basePath .'images/gallery/large/' . $imageId . '.jpg';
  6. require_once($this->config->basePath . 'imagemagick.php');
  7.                        
  8. $img = new ims;
  9. $resource = $img->create_resource();
  10. $img->load_image($original, $resource);
  11. $img->crop_image($resource, $_POST['crop']['w'], $_POST['crop']['h'], $_POST['crop']['x'], $_POST['crop']['y']);
  12. $img->output_image($resource, 'JPG', $image_loc_lge, $image_quality_lge);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement