Dimension d = getImageBounds(base).getSize(); d.width *= scale; d.height *= scale; ScaledCacheKey key = new ScaledCacheKey(base, d); Image scaled = (Image) scaledImageCache.get(key);
Image scaled = (Image) scaledImageCaches[zoomIndex].get(base);
    private Image getScaledImage(Image base, double scale ) {        if (base == null) {            return null;        }        if ( zoomIndex == BASE_ZOOM_INDEX ) {            return base;        }        Dimension d = getImageBounds(base).getSize();        d.width *= scale;        d.height *= scale;        ScaledCacheKey key = new ScaledCacheKey(base, d);        Image scaled = (Image) scaledImageCache.get(key);        if (scaled == null) {            scaled = scale(base, d.width, d.height);            MediaTracker tracker = new MediaTracker(this);            tracker.addImage( scaled, 1 );            // Wait for image to load            try{                tracker.waitForID( 1 );            } catch ( InterruptedException e ){ e.printStackTrace(); }                          scaledImageCache.put(key, scaled);        }        return scaled;    }