WebOCR/src/main/java/org/webocr/util/ImageUtil.java
/**
     * Resize the image by the predefined resize factor.
     * 
     * @param image BufferedImage to be resized.
     * @return
     */
Resize the image by the predefined resize factor.

@param image BufferedImage to be resized.
@return
Resize the image by the predefined resize factor . @param image BufferedImage to be resized . @return
public static BufferedImage upscaleImage(BufferedImage image) {
	int width = image.getWidth() * RESCALE_FACTOR;
	int height = image.getHeight() * RESCALE_FACTOR;
	BufferedImage scaledImage = new BufferedImage(width, height, BufferedImage.TYPE_INT_ARGB);
	Graphics2D graphics2D = scaledImage.createGraphics();
	graphics2D.setRenderingHint(RenderingHints.KEY_INTERPOLATION, RenderingHints.VALUE_INTERPOLATION_BILINEAR);
	graphics2D.drawImage(image, 0, 0, width, height, null);
	graphics2D.dispose();
	return scaledImage;
    }
public static BufferedImage upscaleImage ( BufferedImage image ) { int width = image . getWidth ( ) * RESCALE_FACTOR ; int height = image . getHeight ( ) * RESCALE_FACTOR ; BufferedImage scaledImage = new BufferedImage ( width , height , BufferedImage . TYPE_INT_ARGB ) ; Graphics2D graphics2D = scaledImage . createGraphics ( ) ; graphics2D . setRenderingHint ( RenderingHints . KEY_INTERPOLATION , RenderingHints . VALUE_INTERPOLATION_BILINEAR ) ; graphics2D . drawImage ( image , 0 , 0 , width , height , null ) ; graphics2D . dispose ( ) ; return scaledImage ; }
Resize the image by the predefined resize factor.
Resize the image by the predefined resize factor .