Class ImageUtil


  • public class ImageUtil
    extends java.lang.Object
    • Constructor Summary

      Constructors 
      Constructor Description
      ImageUtil()  
    • Method Summary

      Modifier and Type Method Description
      static boolean isBlack​(java.awt.image.BufferedImage image, int x, int y)
      Whether the pixel is black.
      static boolean isBlack​(java.awt.image.BufferedImage image, int x, int y, int luminanceCutOff)
      Whether the pixel is black.
      static java.awt.image.BufferedImage rotate​(java.awt.image.BufferedImage image, double angle, int cx, int cy)
      Rotates image.
      • Methods inherited from class java.lang.Object

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

      • ImageUtil

        public ImageUtil()
    • Method Detail

      • isBlack

        public static boolean isBlack​(java.awt.image.BufferedImage image,
                                      int x,
                                      int y)
        Whether the pixel is black.
        Parameters:
        image - source image
        x -
        y -
        Returns:
      • isBlack

        public static boolean isBlack​(java.awt.image.BufferedImage image,
                                      int x,
                                      int y,
                                      int luminanceCutOff)
        Whether the pixel is black.
        Parameters:
        image - source image
        x -
        y -
        luminanceCutOff -
        Returns:
      • rotate

        public static java.awt.image.BufferedImage rotate​(java.awt.image.BufferedImage image,
                                                          double angle,
                                                          int cx,
                                                          int cy)
        Rotates image.
        Parameters:
        image - source image
        angle - by degrees
        cx - x-coordinate of pivot point
        cy - y-coordinate of pivot point
        Returns:
        rotated image