1

I try to get a subImage from the given image as shown below: enter image description here I know how to crop in rectangular shape like this

image = image.getSubImage(x, y, width, height);

but by using this method it is not possible for me to get different shape image from a given image, if anyone has suggestion can show me. Thanks in advance!

4

1 回答 1

0

您可以通过 Graphics 类做到这一点:http: //docs.oracle.com/javase/tutorial/2d/advanced/clipping.html

于 2013-02-25T03:49:08.080 回答