PNGImageDecoder
Date: 2016-04-28

org.apache.xmlgraphics.image.codec.png

## Class PNGImageDecoder

- java.lang.Object
- - org.apache.xmlgraphics.image.codec.util.ImageDecoderImpl
  - - org.apache.xmlgraphics.image.codec.png.PNGImageDecoder

- All Implemented Interfaces:
    ImageDecoder

      public class PNGImageDecoder
      extends ImageDecoderImpl

- - ### Field Summary

    - ### Fields inherited from class org.apache.xmlgraphics.image.codec.util.ImageDecoderImpl

      `input, param`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `PNGImageDecoder(java.io.InputStream input, PNGDecodeParam param)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `java.awt.image.RenderedImage` | `decodeAsRenderedImage(int page)` Returns a `RenderedImage` that contains the decoded contents of the `SeekableStream` associated with this `ImageDecoder`.
    `static void` | `readPNGHeader(javax.imageio.stream.ImageInputStream inputStream, ImageSize size)`

    - ### Methods inherited from class org.apache.xmlgraphics.image.codec.util.ImageDecoderImpl

      `decodeAsRaster, decodeAsRaster, decodeAsRenderedImage, getInputStream, getNumPages, getParam, setParam`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### PNGImageDecoder

          public PNGImageDecoder(java.io.InputStream input,
                         PNGDecodeParam param)

  - ### Method Detail

    - #### decodeAsRenderedImage

          public java.awt.image.RenderedImage decodeAsRenderedImage(int page)
                                                             throws java.io.IOException

      Description copied from class: `ImageDecoderImpl`
      Returns a `RenderedImage` that contains the decoded contents of the `SeekableStream` associated with this `ImageDecoder`. The given page of a multi-page image is decoded. If the page does not exist, an IOException will be thrown. Page numbering begins at zero.
      Specified by:
        `decodeAsRenderedImage` in interface `ImageDecoder`
      Specified by:
        `decodeAsRenderedImage` in class `ImageDecoderImpl`
      Parameters:
        `page` - The page to be decoded.
      Throws:
        `java.io.IOException`

    - #### readPNGHeader

          public static void readPNGHeader(javax.imageio.stream.ImageInputStream inputStream,
                           ImageSize size)
                                    throws java.io.IOException

      Throws:
        `java.io.IOException`