public BufferedImage filter(BufferedImage src, BufferedImage dst)
public final BufferedImage filter(BufferedImage src, BufferedImage dst)
  public BufferedImage filter(BufferedImage src, BufferedImage dst)  {    if (src == dst)      throw new IllegalArgumentException();        if (dst == null)      dst = createCompatibleDestImage(src, src.getColorModel());        // Make sure source image is premultiplied    BufferedImage src1 = src;    if (!src.isPremultiplied)    {      src1 = createCompatibleDestImage(src, src.getColorModel());      src.copyData(src1.getRaster());      src1.coerceData(true);    }    BufferedImage dst1 = dst;    if (!src.getColorModel().equals(dst.getColorModel()))      dst1 = createCompatibleDestImage(src, src.getColorModel());    filter(src1.getRaster(), dst1.getRaster());        if (dst1 != dst)    {      // Convert between color models.      // TODO Check that premultiplied alpha is handled correctly here.      Graphics2D gg = dst.createGraphics();      gg.setRenderingHints(hints);      gg.drawImage(dst1, 0, 0, null);      gg.dispose();    }        return dst;  }