Class PNMMetadata
- java.lang.Object
-
- javax.imageio.metadata.IIOMetadata
-
- com.github.jaiimageio.impl.plugins.pnm.PNMMetadata
-
- All Implemented Interfaces:
java.lang.Cloneable
public class PNMMetadata extends javax.imageio.metadata.IIOMetadata implements java.lang.CloneableMetadata for the PNM plug-in.
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.ArrayListcommentsThe comments.private intheightThe image height.private intmaxSampleThe max value for the encoded/decoded image.private intmaxSampleSizeMaximum number of bits per sample (not in metadata).(package private) static java.lang.StringnativeMetadataFormatNameprivate intvariantThe image variants.private intwidthThe image width.
-
Constructor Summary
Constructors Constructor Description PNMMetadata()Constructor containing code shared by other constructors.PNMMetadata(javax.imageio.ImageTypeSpecifier imageType, javax.imageio.ImageWriteParam param)Constructs a default imagePNMMetadataobject appropriate for the given image type and write parameters.PNMMetadata(javax.imageio.metadata.IIOMetadata metadata)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddComment(java.lang.String comment)protected java.lang.Objectclone()org.w3c.dom.NodegetAsTree(java.lang.String formatName)java.lang.ObjectgetAttribute(org.w3c.dom.Node node, java.lang.String name)(package private) java.util.IteratorgetComments()java.lang.StringgetFormatName()(package private) intgetMaxBitDepth()(package private) intgetMaxValue()(package private) javax.imageio.metadata.IIOMetadataNodegetNativeTree()protected javax.imageio.metadata.IIOMetadataNodegetStandardChromaNode()protected javax.imageio.metadata.IIOMetadataNodegetStandardDataNode()protected javax.imageio.metadata.IIOMetadataNodegetStandardDimensionNode()protected javax.imageio.metadata.IIOMetadataNodegetStandardTextNode()java.lang.StringgetVariant()(package private) voidinitialize(javax.imageio.ImageTypeSpecifier imageType, javax.imageio.ImageWriteParam param)(package private) booleanisRaw()booleanisReadOnly()private voidmergeNativeTree(org.w3c.dom.Node root)private voidmergeStandardTree(org.w3c.dom.Node root)voidmergeTree(java.lang.String formatName, org.w3c.dom.Node root)voidreset()voidsetFromTree(java.lang.String formatName, org.w3c.dom.Node root)voidsetHeight(int h)voidsetMaxBitDepth(int maxValue)Set the maximum sample size and maximum sample value.voidsetVariant(int v)Sets the variant: '1' - '6'.voidsetWidth(int w)-
Methods inherited from class javax.imageio.metadata.IIOMetadata
activateController, getController, getDefaultController, getExtraMetadataFormatNames, getMetadataFormat, getMetadataFormatNames, getNativeMetadataFormatName, getStandardCompressionNode, getStandardDocumentNode, getStandardTileNode, getStandardTransparencyNode, getStandardTree, hasController, isStandardMetadataFormatSupported, setController
-
-
-
-
Field Detail
-
nativeMetadataFormatName
static final java.lang.String nativeMetadataFormatName
- See Also:
- Constant Field Values
-
maxSample
private int maxSample
The max value for the encoded/decoded image.
-
width
private int width
The image width.
-
height
private int height
The image height.
-
variant
private int variant
The image variants.
-
comments
private java.util.ArrayList comments
The comments.
-
maxSampleSize
private int maxSampleSize
Maximum number of bits per sample (not in metadata).
-
-
Constructor Detail
-
PNMMetadata
PNMMetadata()
Constructor containing code shared by other constructors.
-
PNMMetadata
public PNMMetadata(javax.imageio.metadata.IIOMetadata metadata) throws javax.imageio.metadata.IIOInvalidTreeException- Throws:
javax.imageio.metadata.IIOInvalidTreeException
-
PNMMetadata
PNMMetadata(javax.imageio.ImageTypeSpecifier imageType, javax.imageio.ImageWriteParam param)Constructs a default imagePNMMetadataobject appropriate for the given image type and write parameters.
-
-
Method Detail
-
initialize
void initialize(javax.imageio.ImageTypeSpecifier imageType, javax.imageio.ImageWriteParam param)
-
clone
protected java.lang.Object clone()
- Overrides:
clonein classjava.lang.Object
-
getAsTree
public org.w3c.dom.Node getAsTree(java.lang.String formatName)
- Specified by:
getAsTreein classjavax.imageio.metadata.IIOMetadata
-
getNativeTree
javax.imageio.metadata.IIOMetadataNode getNativeTree()
-
getStandardChromaNode
protected javax.imageio.metadata.IIOMetadataNode getStandardChromaNode()
- Overrides:
getStandardChromaNodein classjavax.imageio.metadata.IIOMetadata
-
getStandardDataNode
protected javax.imageio.metadata.IIOMetadataNode getStandardDataNode()
- Overrides:
getStandardDataNodein classjavax.imageio.metadata.IIOMetadata
-
getStandardDimensionNode
protected javax.imageio.metadata.IIOMetadataNode getStandardDimensionNode()
- Overrides:
getStandardDimensionNodein classjavax.imageio.metadata.IIOMetadata
-
getStandardTextNode
protected javax.imageio.metadata.IIOMetadataNode getStandardTextNode()
- Overrides:
getStandardTextNodein classjavax.imageio.metadata.IIOMetadata
-
isReadOnly
public boolean isReadOnly()
- Specified by:
isReadOnlyin classjavax.imageio.metadata.IIOMetadata
-
mergeTree
public void mergeTree(java.lang.String formatName, org.w3c.dom.Node root) throws javax.imageio.metadata.IIOInvalidTreeException- Specified by:
mergeTreein classjavax.imageio.metadata.IIOMetadata- Throws:
javax.imageio.metadata.IIOInvalidTreeException
-
setFromTree
public void setFromTree(java.lang.String formatName, org.w3c.dom.Node root) throws javax.imageio.metadata.IIOInvalidTreeException- Overrides:
setFromTreein classjavax.imageio.metadata.IIOMetadata- Throws:
javax.imageio.metadata.IIOInvalidTreeException
-
reset
public void reset()
- Specified by:
resetin classjavax.imageio.metadata.IIOMetadata
-
getFormatName
public java.lang.String getFormatName()
-
getVariant
public java.lang.String getVariant()
-
isRaw
boolean isRaw()
-
setVariant
public void setVariant(int v)
Sets the variant: '1' - '6'.
-
setWidth
public void setWidth(int w)
-
setHeight
public void setHeight(int h)
-
getMaxBitDepth
int getMaxBitDepth()
-
getMaxValue
int getMaxValue()
-
setMaxBitDepth
public void setMaxBitDepth(int maxValue)
Set the maximum sample size and maximum sample value.- Parameters:
maxValue- The maximum sample value. This method computes the maximum sample size.
-
addComment
public void addComment(java.lang.String comment)
-
getComments
java.util.Iterator getComments()
-
mergeNativeTree
private void mergeNativeTree(org.w3c.dom.Node root) throws javax.imageio.metadata.IIOInvalidTreeException- Throws:
javax.imageio.metadata.IIOInvalidTreeException
-
mergeStandardTree
private void mergeStandardTree(org.w3c.dom.Node root) throws javax.imageio.metadata.IIOInvalidTreeException- Throws:
javax.imageio.metadata.IIOInvalidTreeException
-
getAttribute
public java.lang.Object getAttribute(org.w3c.dom.Node node, java.lang.String name)
-
-