Here you can find the source of zoomInImage(BufferedImage originalImage, int width, int height)
public static BufferedImage zoomInImage(BufferedImage originalImage, int width, int height)
//package com.java2s; import java.awt.Graphics; import java.awt.image.BufferedImage; public class Main { public static BufferedImage zoomInImage(BufferedImage originalImage, int width, int height) { BufferedImage newImage = new BufferedImage(width, height, originalImage.getType()); Graphics g = newImage.getGraphics(); g.drawImage(originalImage, 0, 0, width, height, null); g.dispose();//ww w. ja va 2s. co m return newImage; } }