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.Cloneable
Metadata for the PNM plug-in.
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.ArrayList
comments
The comments.private int
height
The image height.private int
maxSample
The max value for the encoded/decoded image.private int
maxSampleSize
Maximum number of bits per sample (not in metadata).(package private) static java.lang.String
nativeMetadataFormatName
private int
variant
The image variants.private int
width
The 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 imagePNMMetadata
object 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 void
addComment(java.lang.String comment)
protected java.lang.Object
clone()
org.w3c.dom.Node
getAsTree(java.lang.String formatName)
java.lang.Object
getAttribute(org.w3c.dom.Node node, java.lang.String name)
(package private) java.util.Iterator
getComments()
java.lang.String
getFormatName()
(package private) int
getMaxBitDepth()
(package private) int
getMaxValue()
(package private) javax.imageio.metadata.IIOMetadataNode
getNativeTree()
protected javax.imageio.metadata.IIOMetadataNode
getStandardChromaNode()
protected javax.imageio.metadata.IIOMetadataNode
getStandardDataNode()
protected javax.imageio.metadata.IIOMetadataNode
getStandardDimensionNode()
protected javax.imageio.metadata.IIOMetadataNode
getStandardTextNode()
java.lang.String
getVariant()
(package private) void
initialize(javax.imageio.ImageTypeSpecifier imageType, javax.imageio.ImageWriteParam param)
(package private) boolean
isRaw()
boolean
isReadOnly()
private void
mergeNativeTree(org.w3c.dom.Node root)
private void
mergeStandardTree(org.w3c.dom.Node root)
void
mergeTree(java.lang.String formatName, org.w3c.dom.Node root)
void
reset()
void
setFromTree(java.lang.String formatName, org.w3c.dom.Node root)
void
setHeight(int h)
void
setMaxBitDepth(int maxValue)
Set the maximum sample size and maximum sample value.void
setVariant(int v)
Sets the variant: '1' - '6'.void
setWidth(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 imagePNMMetadata
object 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:
clone
in classjava.lang.Object
-
getAsTree
public org.w3c.dom.Node getAsTree(java.lang.String formatName)
- Specified by:
getAsTree
in classjavax.imageio.metadata.IIOMetadata
-
getNativeTree
javax.imageio.metadata.IIOMetadataNode getNativeTree()
-
getStandardChromaNode
protected javax.imageio.metadata.IIOMetadataNode getStandardChromaNode()
- Overrides:
getStandardChromaNode
in classjavax.imageio.metadata.IIOMetadata
-
getStandardDataNode
protected javax.imageio.metadata.IIOMetadataNode getStandardDataNode()
- Overrides:
getStandardDataNode
in classjavax.imageio.metadata.IIOMetadata
-
getStandardDimensionNode
protected javax.imageio.metadata.IIOMetadataNode getStandardDimensionNode()
- Overrides:
getStandardDimensionNode
in classjavax.imageio.metadata.IIOMetadata
-
getStandardTextNode
protected javax.imageio.metadata.IIOMetadataNode getStandardTextNode()
- Overrides:
getStandardTextNode
in classjavax.imageio.metadata.IIOMetadata
-
isReadOnly
public boolean isReadOnly()
- Specified by:
isReadOnly
in classjavax.imageio.metadata.IIOMetadata
-
mergeTree
public void mergeTree(java.lang.String formatName, org.w3c.dom.Node root) throws javax.imageio.metadata.IIOInvalidTreeException
- Specified by:
mergeTree
in 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:
setFromTree
in classjavax.imageio.metadata.IIOMetadata
- Throws:
javax.imageio.metadata.IIOInvalidTreeException
-
reset
public void reset()
- Specified by:
reset
in 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)
-
-