org.jboss.media.format.image.iio
Class PNGMediaHeader

java.lang.Object
  extended byorg.jboss.media.format.image.iio.IIOMediaHeader (src) 
      extended byorg.jboss.media.format.image.iio.PNGMediaHeader
All Implemented Interfaces:
MediaHeader (src) , java.io.Serializable

public class PNGMediaHeader
extends IIOMediaHeader (src)

PNG MediaHeader based on the Java Image I/O API.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.jboss.media.format.image.iio.IIOMediaHeader (src)
imageMetadata, metadataRootNode
 
Constructor Summary
PNGMediaHeader(javax.imageio.metadata.IIOMetadata imageMetadata)
          Constructor.
 
Method Summary
 java.lang.String getBitDepth()
          The bit depth of the image samples.
 java.lang.String getColorType()
          The color type of the image.
 java.lang.String getCompressionMethod()
          The compression used for image data.
 java.lang.Object getField(java.lang.String fieldname)
          Returns the field with the given name downcast to Object.
 java.lang.String[] getFieldNames()
          Returns an array of Strings containing all the field names defined for the header.
 java.lang.String getFilterMethod()
          The filtering method used for compression.
 int getGamma()
          The image gamma, multiplied by 1e5.
 int getHeight()
          The height of the image in pixels.
 java.lang.String getInterlaceMethod()
          The interlacing method.
 java.lang.String getPixelsPerUnitSpecifier()
          The unit specifier for this chunk (i.e., meters).
 int getPixelsPerUnitXAxis()
          The number of horizontal pixels per unit, multiplied by 1e5.
 int getPixelsPerUnitYAxis()
          The number of vertical pixels per unit, multiplied by 1e5.
 int getWidth()
          The width of the image in pixels.
 
Methods inherited from class org.jboss.media.format.image.iio.IIOMediaHeader (src)
getAttribute, getAttribute, getNode, getNode
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PNGMediaHeader

public PNGMediaHeader(javax.imageio.metadata.IIOMetadata imageMetadata)
Constructor.

Method Detail

getFieldNames

public java.lang.String[] getFieldNames()
Description copied from interface: MediaHeader (src)
Returns an array of Strings containing all the field names defined for the header.

Specified by:
getFieldNames in interface MediaHeader (src)
Specified by:
getFieldNames in class IIOMediaHeader (src)
See Also:
MediaHeader.getFieldNames()

getField

public java.lang.Object getField(java.lang.String fieldname)
Description copied from interface: MediaHeader (src)
Returns the field with the given name downcast to Object. If the field is modeled as a Java base type, an instance of the corresponding wrapper class has to be returned. The value null is returned if a field name is passed that is not defined for the receiver.

Specified by:
getField in interface MediaHeader (src)
Specified by:
getField in class IIOMediaHeader (src)
See Also:
MediaHeader.getField(java.lang.String)

getWidth

public int getWidth()
The width of the image in pixels.

Returns:
1 (inclusive) to 2147483647 (inclusive).

getHeight

public int getHeight()
The height of the image in pixels.

Returns:
1 (inclusive) to 2147483647 (inclusive).

getBitDepth

public java.lang.String getBitDepth()
The bit depth of the image samples.

Returns:
"1", "2", "4", "8" or "16".

getColorType

public java.lang.String getColorType()
The color type of the image.

Returns:
"Grayscale", "RGB", "Palette", "GrayAlpha" or "RGBAlpha".

getCompressionMethod

public java.lang.String getCompressionMethod()
The compression used for image data.

Returns:
allways "deflate".

getFilterMethod

public java.lang.String getFilterMethod()
The filtering method used for compression.

Returns:
allways "adaptive".

getInterlaceMethod

public java.lang.String getInterlaceMethod()
The interlacing method.

Returns:
"none" or "adam7".

getGamma

public int getGamma()
The image gamma, multiplied by 1e5.

Returns:
0 (inclusive) to 2147483647 (inclusive).

getPixelsPerUnitXAxis

public int getPixelsPerUnitXAxis()
The number of horizontal pixels per unit, multiplied by 1e5.

Returns:
0 (inclusive) to 2147483647 (inclusive).

getPixelsPerUnitYAxis

public int getPixelsPerUnitYAxis()
The number of vertical pixels per unit, multiplied by 1e5.

Returns:
0 (inclusive) to 2147483647 (inclusive).

getPixelsPerUnitSpecifier

public java.lang.String getPixelsPerUnitSpecifier()
The unit specifier for this chunk (i.e., meters).

Returns:
"unknown" or "meter".