Class ImageUtil


  • public final class ImageUtil
    extends Object
    • Method Detail

      • imageFromComponent

        public static BufferedImage imageFromComponent​(Component c,
                                                       Rectangle bounds)
        Create image from component.
        Parameters:
        c - the component.
        bounds - the bounds inside the component to capture.
        Returns:
        image containing the captured area.
      • imageFromComponent

        public static BufferedImage imageFromComponent​(Component c,
                                                       Rectangle bounds,
                                                       boolean print)
        Create image from component.
        Parameters:
        c - the component.
        bounds - the bounds inside the component to capture.
        Returns:
        image containing the captured area.
      • scaledImageFromComponent

        public static BufferedImage scaledImageFromComponent​(Component c,
                                                             Rectangle bounds)
        Create image from component.
        Parameters:
        c - the component.
        bounds - the bounds inside the component to capture.
        Returns:
        image containing the captured area.
      • scaledImageFromComponent

        public static BufferedImage scaledImageFromComponent​(Component c,
                                                             Rectangle bounds,
                                                             double scalex,
                                                             double scaley,
                                                             boolean print)
        Create image from component.
        Parameters:
        c - the component.
        bounds - the bounds inside the component to capture.
        scalex - the x scale
        scaley - the y scale
        Returns:
        image containing the captured area.
      • createCompatibleImage

        public static BufferedImage createCompatibleImage​(int width,
                                                          int height)
      • createCompatibleTransparentImage

        public static BufferedImage createCompatibleTransparentImage​(int width,
                                                                     int height)
      • createCompatibleTranslucentImage

        public static BufferedImage createCompatibleTranslucentImage​(int width,
                                                                     int height)