Java BufferedImage Zoom zoomInImage(BufferedImage originalImage, int width, int height)

Here you can find the source of zoomInImage(BufferedImage originalImage, int width, int height)

Description

zoom In Image

License

Open Source License

Declaration

public static BufferedImage zoomInImage(BufferedImage originalImage,
        int width, int height) 

Method Source Code

//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;
    }
}

Related

  1. zoom(BufferedImage srcBufferedImage, File destFile, int destHeight, int destWidth)
  2. zoom(String srcImageFile, String result, int destHeight, int destWidth)