Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| xmlgraphics-commons 1.5
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.xmlgraphics.image.writer
Class ImageWriterUtil

    java.lang.Object
      org.apache.xmlgraphics.image.writer.ImageWriterUtil

    public final class ImageWriterUtil

extends Object

Convenience methods around ImageWriter for the most important tasks.

Method Summary
`static void` | `saveAsFile(RenderedImage bitmap, int resolution, File outputFile, String mime)` Saves a RenderedImage as a file.
`static void` | `saveAsPNG(RenderedImage bitmap, File outputFile)` Saves a RenderedImage as a PNG file with 96 dpi.
`static void` | `saveAsPNG(RenderedImage bitmap, int resolution, File outputFile)` Saves a RenderedImage as a PNG file.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Method Detail

### saveAsPNG

    public static void saveAsPNG(RenderedImage bitmap,
                                 File outputFile)
                          throws IOException

  Saves a RenderedImage as a PNG file with 96 dpi.

  Parameters:
    `bitmap` - the bitmap to encode
    `outputFile` - the target file
  Throws:
    `IOException` - in case of an I/O problem

### saveAsPNG

    public static void saveAsPNG(RenderedImage bitmap,
                                 int resolution,
                                 File outputFile)
                          throws IOException

  Saves a RenderedImage as a PNG file.

  Parameters:
    `bitmap` - the bitmap to encode
    `resolution` - the bitmap resolution
    `outputFile` - the target file
  Throws:
    `IOException` - in case of an I/O problem

### saveAsFile

    public static void saveAsFile(RenderedImage bitmap,
                                  int resolution,
                                  File outputFile,
                                  String mime)
                           throws IOException

  Saves a RenderedImage as a file. The image format is given through the MIME type

  Parameters:
    `bitmap` - the bitmap to encode
    `resolution` - the bitmap resolution
    `outputFile` - the target file
    `mime` - the MIME type of the target file
  Throws:
    `IOException` - in case of an I/O problem

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| xmlgraphics-commons 1.5
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright 1999-2012 The Apache Software Foundation. All Rights Reserved.