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

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

Introduction

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

Prototype

ImageFormats PCX

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

Click Source Link

Usage

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

public static void writePcx(BufferedImage img, File file) throws IOException {
    if (img == null) {
        return;//from   w w w  .java2 s .  c o  m
    }
    final ImageFormat format = ImageFormats.PCX;
    try {
        Imaging.writeImage(img, file, format, null);
    } catch (ImageWriteException ex) {
        throw new IOException(ex);
    }
}