Package com.iizxi.image
Class RoundedCorners
- java.lang.Object
- com.iizxi.image.RoundedCorners
 
- public class RoundedCorners extends java.lang.ObjectClass to round corner of an image.- Author:
- Christopher Mindus
 
- Constructor Summary- Constructors - Constructor - Description - RoundedCorners()
 - Method Summary- All Methods Static Methods Concrete Methods - Modifier and Type - Method - Description - static java.awt.image.BufferedImage- round(java.awt.image.BufferedImage image, int radiusPercent)Performs a "soft-rounded clip" of the image file.- static void- round(java.io.File input, java.io.File output, java.lang.String formatName, int radiusPercent)Performs a "soft-rounded clip" of the image file.
 
- Method Detail- round- public static void round(java.io.File input, java.io.File output, java.lang.String formatName, int radiusPercent) throws java.io.IOExceptionPerforms a "soft-rounded clip" of the image file. The edges might overflow a little bit in the rounded area due to anti-aliasing.- Parameters:
- input- The input image file.
- output- The output file where the rounded corners are applies.
- formatName- A- Stringcontaining the informal name of the format.
- radiusPercent- The radius percent to apply to the image file.
- Throws:
- java.io.IOException- For I/O errors.
 
 - round- public static java.awt.image.BufferedImage round(java.awt.image.BufferedImage image, int radiusPercent)Performs a "soft-rounded clip" of the image file. The edges might overflow a little bit in the rounded area due to anti-aliasing.- Parameters:
- image- Input image.
- radiusPercent- The rounded corner value in the maximum size of the image, max(width,height).
- Returns:
- The new rounded anti-aliased image.
- Throws:
- java.lang.IllegalArgumentException- If- radiusPercentis less than zero or larger than 100.