private Image mapAndCacheImage( Image image ) {
			return cache.computeIfAbsent( image, img -> {
				// using ImageIcon here makes sure that the image is loaded
				return new ImageIcon( mapper.apply( img ) ).getImage();
			} );
		}
A multi-resolution image implementation that maps images on demand for requested sizes.
flatlaf-core/src/main/java9/com/formdev/flatlaf/util/MultiResolutionImageSupport.java