overlap Buffered Image - Java 2D Graphics

Java examples for 2D Graphics:BufferedImage Resize

Description

overlap Buffered Image

Demo Code


//package com.java2s;

import java.awt.Graphics2D;

import java.awt.image.BufferedImage;

public class Main {
    public static BufferedImage overlapBufferedImage(BufferedImage baseImg,
            BufferedImage inImg) {
        Graphics2D g2 = baseImg.createGraphics();
        g2.drawImage(baseImg, null, 0, 0);
        g2.drawImage(inImg, null, 0, 0);
        g2.dispose();/*  ww w .j  a  va  2  s.com*/
        return baseImg;
    }
}

Related Tutorials