Save cut image with jquery.Jcrop.js

0

Save the image I do not know how to do it the code is this

<?php
if ($_SERVER['REQUEST_METHOD'] == 'POST')
{
    $targ_w = 150;
  $targ_h = 150;
    $jpeg_quality = 90;

    $src = 'sago.jpg';
    $img_r = imagecreatefromjpeg($src);
    $dst_r = ImageCreateTrueColor( $targ_w, $targ_h );

    imagecopyresampled($dst_r,$img_r,0,0,$_POST['x'],$_POST['y'],
   $targ_w,$targ_h,$_POST['w'],$_POST['h']);

    header('Content-type: image/jpeg');
    imagejpeg($dst_r,null,$jpeg_quality);


    exit;
}

?>
    
asked by Cesar 28.02.2018 в 20:36
source

0 answers