Good day.
i have problem with a crop image.
original image:
after use code i give next image:
Code for crop image:
$pathTemp = '../Images/Temp/';
$path = '../Images/';
$pathCrop = '../Images/Crop/';
if($image=='0'){die('error_image');}
if (!copy($pathTemp.$image, $path.$image)){die('error_image');}
$ext_arr = explode('.',$image);
$ext = $ext_arr[1];
$jpeg_quality = 90;
$src = $pathCrop.$image;
$img_r = imagecreatefromjpeg($src);
$dst_r = imagecreatetruecolor($_POST['w'], $_POST['h']);
imagecopyresized($dst_r,$img_r,0,0,$_POST['x1'],$_POST['y1'],170,110,$_POST['w'],$_POST['h']);
imagejpeg($dst_r,$pathCrop.time().'.jpg',$jpeg_quality);
Tell me please where i have error?
Why i get bad end image?