Class ImageUtils

java.lang.Object
com.jhlabs.image.ImageUtils

public abstract class ImageUtils extends Object
  • Field Details

  • Constructor Details

    • ImageUtils

      public ImageUtils()
  • Method Details

    • createImage

      public static BufferedImage createImage(ImageProducer producer)
    • convertImageToARGB

      public static BufferedImage convertImageToARGB(Image image)
      Convert an Image into a TYPE_INT_ARGB BufferedImage. If the image is already of this type, the original image is returned unchanged.
    • getSubimage

      public static BufferedImage getSubimage(BufferedImage image, int x, int y, int w, int h)
    • cloneImage

      public static BufferedImage cloneImage(BufferedImage image)
    • paintCheckedBackground

      public static void paintCheckedBackground(Component c, Graphics g, int x, int y, int width, int height)
    • getSelectedBounds

      public static Rectangle getSelectedBounds(BufferedImage p)
    • composeThroughMask

      public static void composeThroughMask(Raster src, WritableRaster dst, Raster sel)
      Compose src onto dst using the alpha of sel to interpolate between the two. I can't think of a way to do this using AlphaComposite.
    • getRGB

      public static int[] getRGB(BufferedImage image, int x, int y, int width, int height, int[] pixels)
      A convenience method for getting ARGB pixels from an image. This tries to avoid the performance penalty of BufferedImage.getRGB unmanaging the image.
    • setRGB

      public static void setRGB(BufferedImage image, int x, int y, int width, int height, int[] pixels)
      A convenience method for setting ARGB pixels in an image. This tries to avoid the performance penalty of BufferedImage.setRGB unmanaging the image.