@@ -0,0 +1,1451 @@
+package com.kgp.imaging;%0A%0Aimport java.awt.RenderingHints;%0Aimport java.awt.geom.Point2D;%0Aimport java.awt.geom.Rectangle2D;%0Aimport java.awt.image.BufferedImage;%0Aimport java.awt.image.BufferedImageOp;%0Aimport java.awt.image.ColorModel;%0Aimport java.awt.image.Raster;%0Aimport java.awt.image.WritableRaster;%0A%0Apublic class FlashOp implements BufferedImageOp %7B%0A%0A%09public float%5B%5D color;%0A%09%0A%09public FlashOp(float%5B%5D color)%7B%0A%09%09this.color = color;%0A%09%7D%0A%09%0A%09@Override%0A%09public BufferedImage createCompatibleDestImage(BufferedImage arg0,%0A%09%09%09ColorModel arg1) %7B%0A%09%09return null;%0A%09%7D%0A%0A%09@Override%0A%09public BufferedImage filter(BufferedImage arg0, BufferedImage arg1) %7B%0A%09%09if (arg1 == null)%0A%09%09%09arg1 = new BufferedImage(arg0.getWidth(), arg0.getHeight(), BufferedImage.TYPE_INT_ARGB);%0A%0A%09%09Raster r = arg0.getData();%0A%09%09WritableRaster w = arg1.getRaster();%0A%09%09for (int x = 0; x %3C arg0.getWidth(); x++)%0A%09%09%09for (int y = 0; y %3C arg0.getHeight(); y++)%0A%09%09%09%7B%0A%09%09%09%09int%5B%5D f = new int%5B4%5D;%0A%09%09%09%09r.getPixel(x, y, f);%0A%09%09%09%09f%5B0%5D *= color%5B0%5D;%0A%09%09%09%09f%5B1%5D *= color%5B1%5D;%0A%09%09%09%09f%5B2%5D *= color%5B2%5D;%0A%09%09%09%09%0A%09%09%09%09w.setPixel(x, y, f);%0A%09%09%09%7D%0A%09%09%0A%09%09%0A%09%09return arg1;%0A%09%7D%0A%0A%09@Override%0A%09public Rectangle2D getBounds2D(BufferedImage arg0) %7B%0A%09%09// TODO Auto-generated method stub%0A%09%09return null;%0A%09%7D%0A%0A%09@Override%0A%09public Point2D getPoint2D(Point2D arg0, Point2D arg1) %7B%0A%09%09// TODO Auto-generated method stub%0A%09%09return null;%0A%09%7D%0A%0A%09@Override%0A%09public RenderingHints getRenderingHints() %7B%0A%09%09// TODO Auto-generated method stub%0A%09%09return null;%0A%09%7D%0A%0A%7D%0A

Create BufferedImageOp for flexible color rescale