ScratchCanvas scratch = new ScratchCanvas(m_destinationWidth, m_destinationHeight);
Context2D context = scratch.getContext();
context.drawImage(m_imageJSO, m_x, m_y, m_width, m_height, 0, 0, m_destinationWidth, m_destinationHeight);
ImageData imageData = context.getImageData(0, 0, m_destinationWidth, m_destinationHeight);
// Now draw the image again, replacing each color with the color key