Here you can find the source of doThumb(BufferedImage from, int width, int height)
public static BufferedImage doThumb(BufferedImage from, int width, int height)
//package com.java2s; //License from project: Apache License import java.awt.image.BufferedImage; public class Main { public static BufferedImage doThumb(BufferedImage from, int width, int height) { BufferedImage to = new BufferedImage(width, height, BufferedImage.TYPE_INT_BGR); to.getGraphics().drawImage(from, 0, 0, width, height, null); return to; }//www . j a va 2 s. c o m }