Example usage for org.apache.commons.imaging ImageFormats BMP

List of usage examples for org.apache.commons.imaging ImageFormats BMP

Introduction

In this page you can find the example usage for org.apache.commons.imaging ImageFormats BMP.

Prototype

ImageFormats BMP

To view the source code for org.apache.commons.imaging ImageFormats BMP.

Click Source Link

Usage

From source file:pl.edu.icm.visnow.lib.utils.ImageUtilities.java

public static void writeBmp(BufferedImage img, File file) throws IOException {
    if (img == null) {
        return;//  w  w w.  j av  a  2 s.c  om
    }
    final ImageFormat format = ImageFormats.BMP;
    try {
        Imaging.writeImage(img, file, format, null);
    } catch (ImageWriteException ex) {
        throw new IOException(ex);
    }
}