ImageData imageData = context.getImageData(0, 0, m_destinationWidth, m_destinationHeight);
// Now draw the image again, replacing each color with the color key
scratch.clear();
Color rgb = Color.fromColorString(m_picture.getColorKey());
context.putImageData(new RGBIgnoreAlphaImageDataFilter(rgb.getR(), rgb.getG(), rgb.getB()).filter(imageData, true), 0, 0);