by using Canvas and JS I can draw a shape like this and have the x,y of each point :
Tha area can be choosen by more than 4 points, look at this link to have an idea.
I need to save and crop the image of the selected area by using the points. I can not use BufferedImage
as it is just rectangular. Which lib in java I can use?
Okay, so starting with...
I used...
to generate...
Now, the image is rectangular, that's just the way it works
Now,
setClip
doesn't is quite rough and isn't effect by anyRenderingHints
, you could make use of "soft clipping" instead, which is more involved, but generates a nicer results. See this example and this exmaple for more details