Package com.jhlabs.image
Class ImageUtils
java.lang.Object
com.jhlabs.image.ImageUtils
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic BufferedImage
cloneImage
(BufferedImage image) static void
composeThroughMask
(Raster src, WritableRaster dst, Raster sel) Compose src onto dst using the alpha of sel to interpolate between the two.static BufferedImage
convertImageToARGB
(Image image) Convert an Image into a TYPE_INT_ARGB BufferedImage.static BufferedImage
createImage
(ImageProducer producer) 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.static Rectangle
static BufferedImage
getSubimage
(BufferedImage image, int x, int y, int w, int h) static void
paintCheckedBackground
(Component c, Graphics g, int x, int y, int width, int height) 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.
-
Field Details
-
SELECTED
public static final int SELECTED- See Also:
-
UNSELECTED
public static final int UNSELECTED- See Also:
-
backgroundImage
-
-
Constructor Details
-
ImageUtils
public ImageUtils()
-
-
Method Details
-
createImage
-
convertImageToARGB
Convert an Image into a TYPE_INT_ARGB BufferedImage. If the image is already of this type, the original image is returned unchanged. -
getSubimage
-
cloneImage
-
paintCheckedBackground
-
getSelectedBounds
-
composeThroughMask
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
A convenience method for getting ARGB pixels from an image. This tries to avoid the performance penalty of BufferedImage.getRGB unmanaging the image. -
setRGB
A convenience method for setting ARGB pixels in an image. This tries to avoid the performance penalty of BufferedImage.setRGB unmanaging the image.
-