I try to get a subImage from the given image as shown below: 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!
您可以通过Graphics类来完成此操作: http : //docs.oracle.com/javase/tutorial/2d/advanced/clipping.html
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.