Package com.iizix.image
Class RoundedCorners
java.lang.Object
com.iizix.image.RoundedCorners
Class to round corner of an image.
- Author:
- Christopher Mindus
- Constructor SummaryConstructors
- Method SummaryModifier and TypeMethodDescription- static BufferedImage- round- (BufferedImage image, int radiusPercent) Performs a "soft-rounded clip" of the image file.- static voidPerforms a "soft-rounded clip" of the image file.
- Constructor Details- RoundedCornerspublic RoundedCorners()
 
- Method Details- roundpublic static void round- (File input, File output, String formatName, int radiusPercent) throws IOException 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:
- 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:
- IOException- For I/O errors.
 
- roundPerforms 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:
- IllegalArgumentException- If- radiusPercentis less than zero or larger than 100.