I have this fiddle where i crop image and get values such as x,y,x1,y1,w,h:
Now what i want is to save that image with those values with Image Intervention but i dont know what function i need to use to pass those parameters. Any suggesion?
function updateCoords(c)
{
console.log(c);
$('#x').val(c.x);
$('#y').val(c.y);
$('#x2').val(c.x2);
$('#y2').val(c.y2);
$('#w').val(c.w);
$('#h').val(c.h);
};
I tried like this but is say that first arguement must be integer.
Image::make($image->getRealPath())->crop($w,$h,$w,$h)->save($path. '/' .$filename); but i get an error that crop first argument need to be integer.
Also what i try is this but it save full size image:
Image::make($image->getRealPath())
->rectangle($x1,$y1,$x2,$y2)->save($path. '/' .$filename);
I used rectangle because only that function recives 4 parameters
from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/2kAlkff
via IFTTT
Aucun commentaire:
Enregistrer un commentaire