List of utility methods to do Image Gray Scale
Image | createGrayedImage(Image i, final boolean b, final int p) create Grayed Image ImageFilter filter = new GrayFilter(b, p); ImageProducer prod = new FilteredImageSource(i.getSource(), filter); Image grayImage = Toolkit.getDefaultToolkit().createImage(prod); return grayImage; |
Image | grayScaleImage(Image img, int percent) Creates a gray scaled variant of the given image ImageProducer producer = new FilteredImageSource(img.getSource(), new GrayFilter(true, percent)); return Toolkit.getDefaultToolkit().createImage(producer); |
boolean | isGrayscale(ImageIcon icon) Determine whether the given image icon is grayscale return isGrayscale(grabRGB(icon));
|
Image | makeGrayImage(Image in) make Gray Image return (GrayFilter.createDisabledImage(in));
|