public synchronized BufferedImage optimized( Getter<BufferedImage> imageSource, int w, int h )
		throws ResourceNotFound 
	{
		//if( image.getWidth() == w && image.getHeight() == h ) return image;
		synchronized(this) {
			if( scales == null ) scales = new ArrayList<SoftReference<BufferedImage>>();
		}
		
		synchronized(scales) {
			for( SoftReference<BufferedImage> scaleRef : scales ) {
				BufferedImage scale = scaleRef.get();
				if( scale != null && scale.getWidth() == w && scale.getHeight() == h ) return scale;
			}
		}
		
		BufferedImage image = getImage(imageSource);
		
		BufferedImage scale = new BufferedImage(w, h, isCompletelyOpaque(imageSource) ? BufferedImage.TYPE_INT_RGB : BufferedImage.TYPE_INT_ARGB);
		Graphics2D g = (Graphics2D)scale.getGraphics();
		g.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
		g.drawImage( image, 0, 0, w, h, 0, 0, image.getWidth(), image.getHeight(), null);
		synchronized( scales ) {
			// TODO: fill in one of the empty spaces
			scales.add(new SoftReference<BufferedImage>(scale));
		}
		return scale;
	}