private BufferedImage image2bufferedImage( Image image ) {
		if( image instanceof BufferedImage )
			return (BufferedImage) image;

		BufferedImage bufferedImage = new BufferedImage( image.getWidth( null ),
			image.getHeight( null ), BufferedImage.TYPE_INT_ARGB );
		Graphics2D g = bufferedImage.createGraphics();
		try {
			g.drawImage( image, 0, 0, null );
		} finally {
			g.dispose();
		}
		return bufferedImage;
	}
Scales the given image to the target dimensions.

This is the same what imgscalr library (https://github.com/rkalla/imgscalr)
would do when invoking Scalr.resize().
flatlaf-core/src/main/java/com/formdev/flatlaf/util/ScaledImageIcon.java