Java BufferedImage Deep Copy deepCopy(BufferedImage bi)

Here you can find the source of deepCopy(BufferedImage bi)

Description

deep Copy

License

Open Source License

Declaration

public static BufferedImage deepCopy(BufferedImage bi) 

Method Source Code

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

import java.awt.image.*;;

public class Main {
    public static BufferedImage deepCopy(BufferedImage bi) {
        ColorModel cm = bi.getColorModel();
        boolean isAlphaPremultiplied = cm.isAlphaPremultiplied();
        WritableRaster raster = bi.copyData(null);
        return new BufferedImage(cm, raster, isAlphaPremultiplied, null);
    }//w  w  w  . j a v a2  s.c o m
}

Related

  1. deepCopy(BufferedImage bi)
  2. deepCopy(BufferedImage image)
  3. deepCopy(BufferedImage image)
  4. deepCopy(BufferedImage source)