org.apache.pdfbox.util
Class ImageIOUtil

java.lang.Object
  extended by org.apache.pdfbox.util.ImageIOUtil

public class ImageIOUtil
extends Object

This class handles some ImageIO operations.

Version:
$Revision$

Method Summary
static boolean writeImage(BufferedImage image, String imageFormat, OutputStream outputStream)
          Writes a buffered image to a file using the given image format.
static boolean writeImage(BufferedImage image, String imageFormat, String filename, int imageType, int resolution)
          Writes a buffered image to a file using the given image format.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

writeImage

public static boolean writeImage(BufferedImage image,
                                 String imageFormat,
                                 String filename,
                                 int imageType,
                                 int resolution)
                          throws IOException
Writes a buffered image to a file using the given image format.

Parameters:
image - the image to be written
imageFormat - the target format (ex. "png")
filename - used to construct the filename for the individual images
imageType - the image type (see BufferedImage.TYPE_*)
resolution - the resolution in dpi (dots per inch)
Returns:
true if the images were produced, false if there was an error
Throws:
IOException - if an I/O error occurs

writeImage

public static boolean writeImage(BufferedImage image,
                                 String imageFormat,
                                 OutputStream outputStream)
                          throws IOException
Writes a buffered image to a file using the given image format.

Parameters:
image - the image to be written
imageFormat - the target format (ex. "png")
outputStream - the output stream to be used for writing
Returns:
true if the images were produced, false if there was an error
Throws:
IOException - if an I/O error occurs


Copyright © 2002-2012 The Apache Software Foundation. All Rights Reserved.