Overview | Package | Class | Tree | Deprecated | Index | Help
| Copyright 2012-04-26 Werner Randelshofer
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.monte.media.png
Class PNGCodec

    java.lang.Object
      org.monte.media.AbstractCodec
          org.monte.media.AbstractVideoCodec
              org.monte.media.png.PNGCodec

All Implemented Interfaces:
  Codec

    public class PNGCodec

extends AbstractVideoCodec

`PNGCodec` encodes a BufferedImage as a byte[] array..

Supported input formats:

`VideoFormat` with `BufferedImage.class`, any width, any height, any depth.

Supported output formats:

`VideoFormat` with `byte[].class`, same width and height as input format, depth=24.

Version:
  $Id: PNGCodec.java 188 2012-03-28 14:03:19Z werner $
Author:
  Werner Randelshofer

Field Summary

Fields inherited from class org.monte.media.AbstractCodec
`inputFormat, inputFormats, name, outputFormat, outputFormats`

Fields inherited from interface org.monte.media.Codec
`CODEC_FAILED, CODEC_INPUT_NOT_CONSUMED, CODEC_OK, CODEC_OUTPUT_NOT_FILLED`

Constructor Summary
`PNGCodec()`

Method Summary
`int` | `process(Buffer in, Buffer out)` Performs the media processing defined by this codec.
`Format` | `setOutputFormat(Format f)` Sets the output format.

Methods inherited from class org.monte.media.AbstractVideoCodec
`copyImage, getARGB32, getBufferedImage, getIndexed8, getRGB15, getRGB16, getRGB24, writeInt24, writeInt24LE, writeInts24, writeInts24LE`

Methods inherited from class org.monte.media.AbstractCodec
`getInputFormat, getInputFormats, getName, getOutputFormat, getOutputFormats, reset, setInputFormat, toString`

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

Constructor Detail

### PNGCodec

    public PNGCodec()

Method Detail

### setOutputFormat

    public Format setOutputFormat(Format f)

  Description copied from interface: `Codec`
  Sets the output format. Returns the format that was actually set. This is the closest format that the Codec supports. Returns null if the specified format is not supported and no reasonable match could be found.

  Specified by:
    `setOutputFormat` in interface `Codec`
  Overrides:
    `setOutputFormat` in class `AbstractCodec`

### process

    public int process(Buffer in,
                       Buffer out)

  Description copied from interface: `Codec`
  Performs the media processing defined by this codec.

  Copies the data from the input buffer into the output buffer.

  Returns:
    A combination of processing flags.

Overview | Package | Class | Tree | Deprecated | Index | Help
| Copyright 2012-04-26 Werner Randelshofer
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD