private BufferedImage scaleImage( BufferedImage image, int targetWidth, int targetHeight,
		Object scalingInterpolation )
	{
		BufferedImage bufferedImage = new BufferedImage( targetWidth, targetHeight, BufferedImage.TYPE_INT_ARGB );
		Graphics2D g = bufferedImage.createGraphics();
		try {
			g.setRenderingHint( RenderingHints.KEY_INTERPOLATION, scalingInterpolation );
			g.drawImage( image, 0, 0, targetWidth, targetHeight, 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