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

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

Introduction

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

Prototype

ImageFormats GIF

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

Click Source Link

Usage

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

public static void writeGif(BufferedImage img, File file) throws IOException {
    if (img == null) {
        return;//from   ww w  .j a  va  2s .c  o  m
    }
    final ImageFormat format = ImageFormats.GIF;
    try {
        Imaging.writeImage(img, file, format, null);
    } catch (ImageWriteException ex) {
        throw new IOException(ex);
    }
}