Beispiel #1
0
  /** {@inheritDoc} */
  @Override
  public BufferedImage filter(BufferedImage src, BufferedImage dst) {
    if (dst == null) {
      dst = createCompatibleDestImage(src, null);
    }

    int width = src.getWidth();
    int height = src.getHeight();

    int[] pixels = new int[width * height];
    GraphicsUtilities.getPixels(src, 0, 0, width, height, pixels);
    mixColor(pixels);
    GraphicsUtilities.setPixels(dst, 0, 0, width, height, pixels);

    return dst;
  }