Java Image to BufferedImage getBufferedImage(Image image)

Here you can find the source of getBufferedImage(Image image)

Description

get Buffered Image

License

Open Source License

Declaration

public static BufferedImage getBufferedImage(Image image) 

Method Source Code


//package com.java2s;
//License from project: Open Source License 

import java.awt.Graphics2D;
import java.awt.Image;
import java.awt.image.BufferedImage;

public class Main {
    public static BufferedImage getBufferedImage(Image image) {
        BufferedImage bufferedImage = new BufferedImage(image.getWidth(null), image.getHeight(null),
                BufferedImage.TYPE_INT_RGB);
        Graphics2D g = bufferedImage.createGraphics();

        g.drawImage(image, null, null);/*from  w  ww  .j  a  va 2s .c  om*/
        // waitForImage(bufferedImage);

        return bufferedImage;
    }
}

Related

  1. bufferedImageFromImage(final Image image)
  2. convertToBufferedImage(Image image)
  3. getBufferedImage(Image image)
  4. getBufferedImage(Image image)
  5. getBufferedImage(Image image)
  6. getBufferedImage(Image img)
  7. getBufferedImage(java.awt.Image image)