List of utility methods to do BufferedImage to Transparent
BufferedImage | makeTransparent(BufferedImage image, int x, int y) make Transparent ColorModel cm = image.getColorModel(); if (!(cm instanceof IndexColorModel)) return image; IndexColorModel icm = (IndexColorModel) cm; WritableRaster raster = image.getRaster(); int pixel = raster.getSample(x, y, 0); int size = icm.getMapSize(); byte[] reds = new byte[size]; ... |
void | makeTransparent(BufferedImage img, Color trColor) make Transparent int w = img.getWidth(); int h = img.getHeight(); if (img.getType() != BufferedImage.TYPE_INT_ARGB) { return; for (int x = 0; x < w; x++) { for (int y = 0; y < h; y++) { if (img.getRaster().getSample(x, y, 0) == trColor.getRed() ... |
BufferedImage | makeTransparentEdges(BufferedImage src) make Transparent Edges return makeTransparentEdges(src, 0, null);
|