Round corners on images using Java and JAI
问题 We're using JAI (https://jai-imageio.dev.java.net/) to scale and crop images in Java. We would like to create round corners on our images. How do we do that? The images are JPG and PNG. I would think it's easier to do this with JPGs? The image is a PlanarImage from JAI PlanarImage src = JAI.create(...,...); which can be transformed to a java.awt.Graphics object Has anyone done this before? 回答1: PNG supports a transparent alpha channel, but JPG does not. So, for JPG you would have to also pick