public void setRGB( BufferedImage image, int x, int y, int width, int height, int[] pixels ) {
		int type = image.getType();
		if ( type == BufferedImage.TYPE_INT_ARGB || type == BufferedImage.TYPE_INT_RGB )
			image.getRaster().setDataElements( x, y, width, height, pixels );
		else
			image.setRGB( x, y, width, height, pixels, 0, width );
    }
A convenience method for setting ARGB pixels in an image. This tries to avoid the performance
penalty of BufferedImage.setRGB unmanaging the image.
tomighty-swing/src/main/java/com/jhlabs/image/BrushedMetalFilter.java