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

## org.apache.xmlgraphics.image.writer
Interface ImageWriter

All Known Implementing Classes:
  AbstractImageWriter, ImageIOImageWriter, ImageIOJPEGImageWriter, ImageIOPNGImageWriter, ImageIOTIFFImageWriter, PNGImageWriter, TIFFImageWriter

    public interface ImageWriter

Interface which allows image library independent image writing.

Version:
  $Id: ImageWriter.java 1732018 2016-02-24 04:51:06Z gadams $

Method Summary
`MultiImageWriter` | `createMultiImageWriter(java.io.OutputStream out)` Creates a MultiImageWriter instance that lets you put multiple pages into a single file if the format supports it.
`java.lang.String` | `getMIMEType()`
`boolean` | `isFunctional()`
`boolean` | `supportsMultiImageWriter()`
`void` | `writeImage(java.awt.image.RenderedImage image, java.io.OutputStream out)` Encodes an image and writes it to an OutputStream.
`void` | `writeImage(java.awt.image.RenderedImage image, java.io.OutputStream out, ImageWriterParams params)` Encodes an image and writes it to an OutputStream.

Method Detail

### writeImage

    void writeImage(java.awt.image.RenderedImage image,
                    java.io.OutputStream out)
                    throws java.io.IOException

  Encodes an image and writes it to an OutputStream.

  Parameters:
    `image` - the image to be encoded
    `out` - the OutputStream to write to
  Throws:
    `java.io.IOException` - In case of an /IO problem

### writeImage

    void writeImage(java.awt.image.RenderedImage image,
                    java.io.OutputStream out,
                    ImageWriterParams params)
                    throws java.io.IOException

  Encodes an image and writes it to an OutputStream.

  Parameters:
    `image` - the image to be encoded
    `out` - the OutputStream to write to
    `params` - a parameters object to customize the encoding.
  Throws:
    `java.io.IOException` - In case of an /IO problem

### getMIMEType

    java.lang.String getMIMEType()

  Returns:
    the target MIME type supported by this ImageWriter

### isFunctional

    boolean isFunctional()

  Returns:
    true if the ImageWriter is expected to work properly in the current environment

### supportsMultiImageWriter

    boolean supportsMultiImageWriter()

  Returns:
    true if the implemented format supports multiple pages in a single file

### createMultiImageWriter

    MultiImageWriter createMultiImageWriter(java.io.OutputStream out)
                                            throws java.io.IOException

  Creates a MultiImageWriter instance that lets you put multiple pages into a single file if the format supports it.

  Parameters:
    `out` - the OutputStream to write the image to
  Returns:
    the requested MultiImageWriter instance
  Throws:
    `java.io.IOException` - In case of an /IO problem

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

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