public void makeColorKeyPixelsTransparent(BufferedImage img, Color colorKey)
    {
        // NOW MAKE ALL PIXELS WITH COLOR (64, 224, 224) TRANSPARENT
        WritableRaster raster = img.getRaster();
        int[] dummy = null;
        for (int i = 0; i < raster.getWidth(); i++)
        {
            for (int j = 0; j < raster.getHeight(); j++)
            {
                int[] pixel = raster.getPixel(i, j, dummy);
                if ((pixel[0] == colorKey.getRed())
                        && (pixel[1] == colorKey.getGreen())
                        && (pixel[2] == colorKey.getBlue()))
                {
                    pixel[3] = 0;
                    raster.setPixel(i, j, pixel);
                }
            }
        }
    }