m0s
m0s

Reputation: 4280

How to crop a polygon from BufferedImage

How to crop a polygon shaped portion of BufferedImage and write it to another BufferedImage?

Upvotes: 0

Views: 1562

Answers (1)

camickr
camickr

Reputation: 324207

Graphics2D has clip(Shape) and draw(Shape) methods. So I would guess you can set the Shape to be your polygon and then paint from one BufferedImage to the other.

Upvotes: 2

Related Questions