Class ImageProcessing
- java.lang.Object
-
- ImageProcessing
-
public class ImageProcessing extends java.lang.Object
The ImageProcessing class provides utility methods for basic image manipulations such as resizing, rotating, and generating multiple rotated versions of an image.- Author:
- Jim Williams
-
-
Constructor Summary
Constructors Constructor Description ImageProcessing()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.awt.image.BufferedImage
createBallImage(int diameter, java.awt.Color color)
Creates an image of a ball with the specified size and color.static java.awt.image.BufferedImage
createCharacterImage(int width, int height, java.lang.String characters, java.awt.Font font, java.awt.Color color)
Creates an image with specified characters, size, and font.static java.awt.image.BufferedImage
createImageFromString(java.lang.String text)
Creates a BufferedImage from the specified text string.
-
-
-
Method Detail
-
createImageFromString
public static java.awt.image.BufferedImage createImageFromString(java.lang.String text)
Creates a BufferedImage from the specified text string. The image is created with a predefined width and height, and the text is drawn onto the image using anti-aliasing for improved text quality.- Parameters:
text
- the text string to be rendered onto the image- Returns:
- a BufferedImage containing the rendered text
-
createBallImage
public static java.awt.image.BufferedImage createBallImage(int diameter, java.awt.Color color)
Creates an image of a ball with the specified size and color.- Parameters:
diameter
- the diameter of the ballcolor
- the color of the ball- Returns:
- a BufferedImage representing the ball
-
createCharacterImage
public static java.awt.image.BufferedImage createCharacterImage(int width, int height, java.lang.String characters, java.awt.Font font, java.awt.Color color)
Creates an image with specified characters, size, and font.- Parameters:
width
- the width of the imageheight
- the height of the imagecharacters
- the characters to be drawnfont
- the font to use for drawing the characterscolor
- the color of the characters- Returns:
- a BufferedImage containing the specified characters
-
-