Class 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.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ImageProcessing

        public ImageProcessing()
    • 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 ball
        color - 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 image
        height - the height of the image
        characters - the characters to be drawn
        font - the font to use for drawing the characters
        color - the color of the characters
        Returns:
        a BufferedImage containing the specified characters