public BufferedImage filter(BufferedImage src, BufferedImage dst)
public final BufferedImage filter(BufferedImage src, BufferedImage dst)
  public BufferedImage filter(BufferedImage src, BufferedImage dst)  {    // TODO: The plan is to create a scanline buffer for intermediate buffers.    // For now we just suck it up and create intermediate buffers.        if (dst == null && spaces.length == 0)      throw new IllegalArgumentException();    // Make sure input isn't premultiplied by alpha    if (src.isAlphaPremultiplied())    {      BufferedImage tmp = createCompatibleDestImage(src, src.getColorModel());      copyimage(src, tmp);      tmp.coerceData(false);      src = tmp;    }    ColorModel scm = src.getColorModel();    for (int i = 0; i < spaces.length; i++)    {      ColorModel cm = scm.cloneColorModel(spaces[i]);      BufferedImage tmp = createCompatibleDestImage(src, cm);      copyimage(src, tmp);      src = tmp;    }    // Intermediate conversions leave result in src    if (dst == null)      return src;        // Apply final conversion    copyimage(src, dst);    return dst;  }