开发者

How to shave off image in Java?

This is what 开发者_运维问答I need to do. I need to create square thumbnails from a standard photo. The photos are usually portrain layout, so I need to shave off the bottom part of the photo so that the height is equals to the width.

If the image is landscape layout then I need to shave off equal number of pixels from left and right to make it square.

Any ideas how to do this?

My image is BufferedImage object already.


You can use getSubimage to retrieve a cropped version of the original image.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜