If you do not mind using an external library, Thumbnailator can perform scaling of BufferedImage
s.
Thumbnailator will take care of handling the Java 2D processing (such as using Graphics2D
and setting appropriate rendering hints) so that a simple fluent API call can be used to resize images:
BufferedImage image = Thumbnails.of(originalImage).scale(2.0).asBufferedImage();
Although Thumbnailator, as its name implies, is geared toward shrinking images, it will do a decent job enlarging images as well, using bilinear interpolation in its default resizer implementation.
Disclaimer: I am the maintainer of the Thumbnailator library.