public function upload_image_crop_save()
 {
     $ObjQuery = new queryModel();
     $ObjListImage = new listingsImagesModel();
     $jpeg_quality = 100;
     $list_id = Input::get('list_id');
     $listimg_id = Input::get('listimg_id');
     $dst_w = (int) Input::get('w');
     $dst_h = (int) Input::get('h');
     $src_x = (int) Input::get('x');
     $src_y = (int) Input::get('y');
     $dst_x = (int) Input::get('x2');
     $dst_y = (int) Input::get('y2');
     $new_width = $dst_x + $dst_w;
     $new_height = $dst_y + $dst_h;
     $details = $ObjListImage->get_image_by_listimg_id($listimg_id);
     $filepath_large = $details->filepath_large;
     $filepath_medium = $details->filepath_medium;
     list($src_w, $src_h) = getimagesize($filepath_large);
     $src = $filepath_large;
     $src_image = imagecreatefromjpeg($src);
     $dst_image = ImageCreateTrueColor($dst_w, $dst_h);
     imagecopyresampled($dst_image, $src_image, $dst_x, $dst_y, $src_x, $src_y, $dst_w, $dst_h, $new_width, $new_height);
     imagejpeg($dst_image, $filepath_medium, $jpeg_quality);
     return Redirect::to('listings_upload_image_crop/' . $list_id . '/' . $listimg_id);
 }