scaled = scale(base, d.width, d.height);
if ((d.width != 0) && (d.height != 0)) scaled = scale(base, d.width, d.height); else scaled = base;
    private Image getScaledImage(Image base) {        if (base == null) {            return null;        }        if ( zoomIndex == BASE_ZOOM_INDEX ) {            return base;        }                Image scaled = scaledImageCache.get(base);        if (scaled == null) {            Dimension d = getImageBounds(base).getSize();            d.width *= scale;            d.height *= scale;            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();            }            tracker.removeImage(scaled);                          scaledImageCache.put(base, scaled);        }        return scaled;    }