Hello,
at job we have modify a PHP that allow to our user to upload->crop an image
with floating area user can select a small portion of image and then commit cut.
Final result is a txt file with some info that are parsed from a script that do things.
one of thing to do is cut select area, post an image to explain our goal:
Our PHP return 4 usefull info, coord for point A and point B. From these we can obtain also C and D coordinates.
Now, how i can script a cut that return my roses in right way ?
thank you for any info,
m.
Cut the rose with PHP help
Re: Cut the rose with PHP help
So the values for A and B are in a text file; these are being read into php variables
If so you need to seperate the two values within A and B then:
If so you need to seperate the two values within A and B then:
Code: Select all
$width = Bx-Ax;
$height = By-Ay;
exec("convert rose -crop +$widthx+$height$Ax+$Ay output.jpg");