Class CLibPNGMetadata
java.lang.Object
javax.imageio.metadata.IIOMetadata
com.github.jaiimageio.impl.plugins.png.CLibPNGMetadata
- All Implemented Interfaces:
Cloneable
-
Field Summary
FieldsModifier and TypeFieldDescriptionint
int
int
int
int
boolean
int
(package private) static final int
int
int
int
int
boolean
int
int
(package private) static final int
int
int
static final String[]
int
boolean
(package private) static final int
private boolean
private boolean
char[]
boolean
(package private) static final int
byte[]
int
static final String[]
boolean
(package private) static final int
(package private) static final int
(package private) static final int
int
static final String[]
int
static final String[]
int
static final String[]
int
static final String[]
int
int
static final String[]
static final int[]
boolean
(package private) static final int
int
(package private) static final int
protected static final String
static final String
int
int
boolean
(package private) static final int
static final int
static final int
int
byte[]
byte[]
boolean
byte[]
(package private) static final int
(package private) static final int
(package private) static final int
(package private) static final int
(package private) static final int
(package private) static final int
static final String[]
int
int
int
int
int
boolean
int
(package private) static final int
int[]
int[]
int[]
int[]
boolean
int[]
int
(package private) static final int
boolean
int
(package private) static final int
(package private) static final int
int
int
int
int
boolean
int
(package private) static final int
int
byte[]
int
int
int
int
boolean
int
(package private) static final int
static final String[]
static final String[]
(package private) static final int
Fields inherited from class javax.imageio.metadata.IIOMetadata
controller, defaultController, extraMetadataFormatClassNames, extraMetadataFormatNames, standardFormatSupported
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static int
clone()
private ArrayList
private void
private String
getAttribute
(Node node, String name) private String
getAttribute
(Node node, String name, String defaultValue, boolean required) private boolean
getBooleanAttribute
(Node node, String name) private boolean
getBooleanAttribute
(Node node, String name, boolean defaultValue, boolean required) private int
getEnumeratedAttribute
(Node node, String name, String[] legalNames) private int
getEnumeratedAttribute
(Node node, String name, String[] legalNames, int defaultValue, boolean required) private float
getFloatAttribute
(Node node, String name) private float
getFloatAttribute
(Node node, String name, float defaultValue, boolean required) private int
getIntAttribute
(Node node, String name) private int
getIntAttribute
(Node node, String name, int defaultValue, boolean required) private Node
private int
void
initialize
(ImageTypeSpecifier imageType, int numBands, ImageWriteParam param, int interlaceMethod) Sets the instance variables of the IHDR and if necessary PLTE and tRNS chunks.private boolean
isISOLatin
(String s) boolean
private void
mergeNativeTree
(Node root) private void
mergeStandardTree
(Node root) void
private String
private String
void
reset()
(package private) static String
Converts its parameter to anotherString
which contains only printable Latin-1 characters but not leading, trailing, or consecutive spaces.Methods inherited from class javax.imageio.metadata.IIOMetadata
activateController, getController, getDefaultController, getExtraMetadataFormatNames, getMetadataFormat, getMetadataFormatNames, getNativeMetadataFormatName, getStandardTileNode, getStandardTree, hasController, isStandardMetadataFormatSupported, setController, setFromTree
-
Field Details
-
nativeMetadataFormatName
- See Also:
-
nativeMetadataFormatClassName
- See Also:
-
IHDR_colorTypeNames
-
IHDR_numChannels
public static final int[] IHDR_numChannels -
IHDR_bitDepths
-
IHDR_compressionMethodNames
-
IHDR_filterMethodNames
-
IHDR_interlaceMethodNames
-
iCCP_compressionMethodNames
-
zTXt_compressionMethodNames
-
PHYS_UNIT_UNKNOWN
public static final int PHYS_UNIT_UNKNOWN- See Also:
-
PHYS_UNIT_METER
public static final int PHYS_UNIT_METER- See Also:
-
unitSpecifierNames
-
renderingIntentNames
-
colorSpaceTypeNames
-
IHDR_TYPE
static final int IHDR_TYPE -
PLTE_TYPE
static final int PLTE_TYPE -
IDAT_TYPE
static final int IDAT_TYPE -
IEND_TYPE
static final int IEND_TYPE -
bKGD_TYPE
static final int bKGD_TYPE -
cHRM_TYPE
static final int cHRM_TYPE -
gAMA_TYPE
static final int gAMA_TYPE -
hIST_TYPE
static final int hIST_TYPE -
iCCP_TYPE
static final int iCCP_TYPE -
iTXt_TYPE
static final int iTXt_TYPE -
pHYs_TYPE
static final int pHYs_TYPE -
sBIT_TYPE
static final int sBIT_TYPE -
sPLT_TYPE
static final int sPLT_TYPE -
sRGB_TYPE
static final int sRGB_TYPE -
tEXt_TYPE
static final int tEXt_TYPE -
tIME_TYPE
static final int tIME_TYPE -
tRNS_TYPE
static final int tRNS_TYPE -
zTXt_TYPE
static final int zTXt_TYPE -
PNG_COLOR_GRAY
static final int PNG_COLOR_GRAY- See Also:
-
PNG_COLOR_RGB
static final int PNG_COLOR_RGB- See Also:
-
PNG_COLOR_PALETTE
static final int PNG_COLOR_PALETTE- See Also:
-
PNG_COLOR_GRAY_ALPHA
static final int PNG_COLOR_GRAY_ALPHA- See Also:
-
PNG_COLOR_RGB_ALPHA
static final int PNG_COLOR_RGB_ALPHA- See Also:
-
IHDR_present
public boolean IHDR_present -
IHDR_width
public int IHDR_width -
IHDR_height
public int IHDR_height -
IHDR_bitDepth
public int IHDR_bitDepth -
IHDR_colorType
public int IHDR_colorType -
IHDR_compressionMethod
public int IHDR_compressionMethod -
IHDR_filterMethod
public int IHDR_filterMethod -
IHDR_interlaceMethod
public int IHDR_interlaceMethod -
PLTE_present
public boolean PLTE_present -
PLTE_red
public byte[] PLTE_red -
PLTE_green
public byte[] PLTE_green -
PLTE_blue
public byte[] PLTE_blue -
bKGD_present
public boolean bKGD_present -
bKGD_colorType
public int bKGD_colorType -
bKGD_index
public int bKGD_index -
bKGD_gray
public int bKGD_gray -
bKGD_red
public int bKGD_red -
bKGD_green
public int bKGD_green -
bKGD_blue
public int bKGD_blue -
cHRM_present
public boolean cHRM_present -
cHRM_whitePointX
public int cHRM_whitePointX -
cHRM_whitePointY
public int cHRM_whitePointY -
cHRM_redX
public int cHRM_redX -
cHRM_redY
public int cHRM_redY -
cHRM_greenX
public int cHRM_greenX -
cHRM_greenY
public int cHRM_greenY -
cHRM_blueX
public int cHRM_blueX -
cHRM_blueY
public int cHRM_blueY -
gAMA_present
public boolean gAMA_present -
gAMA_gamma
public int gAMA_gamma -
hIST_present
public boolean hIST_present -
hIST_histogram
public char[] hIST_histogram -
iCCP_present
public boolean iCCP_present -
iCCP_profileName
-
iCCP_compressionMethod
public int iCCP_compressionMethod -
iCCP_compressedProfile
public byte[] iCCP_compressedProfile -
iTXt_keyword
-
iTXt_compressionFlag
-
iTXt_compressionMethod
-
iTXt_languageTag
-
iTXt_translatedKeyword
-
iTXt_text
-
pHYs_present
public boolean pHYs_present -
pHYs_pixelsPerUnitXAxis
public int pHYs_pixelsPerUnitXAxis -
pHYs_pixelsPerUnitYAxis
public int pHYs_pixelsPerUnitYAxis -
pHYs_unitSpecifier
public int pHYs_unitSpecifier -
sBIT_present
public boolean sBIT_present -
sBIT_colorType
public int sBIT_colorType -
sBIT_grayBits
public int sBIT_grayBits -
sBIT_redBits
public int sBIT_redBits -
sBIT_greenBits
public int sBIT_greenBits -
sBIT_blueBits
public int sBIT_blueBits -
sBIT_alphaBits
public int sBIT_alphaBits -
sPLT_present
public boolean sPLT_present -
sPLT_paletteName
-
sPLT_sampleDepth
public int sPLT_sampleDepth -
sPLT_red
public int[] sPLT_red -
sPLT_green
public int[] sPLT_green -
sPLT_blue
public int[] sPLT_blue -
sPLT_alpha
public int[] sPLT_alpha -
sPLT_frequency
public int[] sPLT_frequency -
sRGB_present
public boolean sRGB_present -
sRGB_renderingIntent
public int sRGB_renderingIntent -
tEXt_keyword
-
tEXt_text
-
tIME_present
public boolean tIME_present -
tIME_year
public int tIME_year -
tIME_month
public int tIME_month -
tIME_day
public int tIME_day -
tIME_hour
public int tIME_hour -
tIME_minute
public int tIME_minute -
tIME_second
public int tIME_second -
tRNS_present
public boolean tRNS_present -
tRNS_colorType
public int tRNS_colorType -
tRNS_alpha
public byte[] tRNS_alpha -
tRNS_gray
public int tRNS_gray -
tRNS_red
public int tRNS_red -
tRNS_green
public int tRNS_green -
tRNS_blue
public int tRNS_blue -
zTXt_keyword
-
zTXt_compressionMethod
-
zTXt_text
-
unknownChunkType
-
unknownChunkData
-
gotHeader
private boolean gotHeader -
gotMetadata
private boolean gotMetadata
-
-
Constructor Details
-
CLibPNGMetadata
public CLibPNGMetadata() -
CLibPNGMetadata
- Throws:
IIOInvalidTreeException
-
-
Method Details
-
toPrintableLatin1
Converts its parameter to anotherString
which contains only printable Latin-1 characters but not leading, trailing, or consecutive spaces.- Parameters:
s
- theString
to convert.- Returns:
- a printable Latin-1
String
sans superfluous spaces.
-
initialize
public void initialize(ImageTypeSpecifier imageType, int numBands, ImageWriteParam param, int interlaceMethod) Sets the instance variables of the IHDR and if necessary PLTE and tRNS chunks. ThenumBands
parameter is necessary since we may only be writing a subset of the image bands. -
isReadOnly
public boolean isReadOnly()- Specified by:
isReadOnly
in classIIOMetadata
-
cloneBytesArrayList
-
clone
-
getAsTree
- Specified by:
getAsTree
in classIIOMetadata
-
getNativeTree
-
getNumChannels
private int getNumChannels() -
getStandardChromaNode
- Overrides:
getStandardChromaNode
in classIIOMetadata
-
getStandardCompressionNode
- Overrides:
getStandardCompressionNode
in classIIOMetadata
-
repeat
-
getStandardDataNode
- Overrides:
getStandardDataNode
in classIIOMetadata
-
getStandardDimensionNode
- Overrides:
getStandardDimensionNode
in classIIOMetadata
-
getStandardDocumentNode
- Overrides:
getStandardDocumentNode
in classIIOMetadata
-
getStandardTextNode
- Overrides:
getStandardTextNode
in classIIOMetadata
-
getStandardTransparencyNode
- Overrides:
getStandardTransparencyNode
in classIIOMetadata
-
fatal
- Throws:
IIOInvalidTreeException
-
getIntAttribute
private int getIntAttribute(Node node, String name, int defaultValue, boolean required) throws IIOInvalidTreeException - Throws:
IIOInvalidTreeException
-
getFloatAttribute
private float getFloatAttribute(Node node, String name, float defaultValue, boolean required) throws IIOInvalidTreeException - Throws:
IIOInvalidTreeException
-
getIntAttribute
- Throws:
IIOInvalidTreeException
-
getFloatAttribute
- Throws:
IIOInvalidTreeException
-
getBooleanAttribute
private boolean getBooleanAttribute(Node node, String name, boolean defaultValue, boolean required) throws IIOInvalidTreeException - Throws:
IIOInvalidTreeException
-
getBooleanAttribute
- Throws:
IIOInvalidTreeException
-
getEnumeratedAttribute
private int getEnumeratedAttribute(Node node, String name, String[] legalNames, int defaultValue, boolean required) throws IIOInvalidTreeException - Throws:
IIOInvalidTreeException
-
getEnumeratedAttribute
private int getEnumeratedAttribute(Node node, String name, String[] legalNames) throws IIOInvalidTreeException - Throws:
IIOInvalidTreeException
-
getAttribute
private String getAttribute(Node node, String name, String defaultValue, boolean required) throws IIOInvalidTreeException - Throws:
IIOInvalidTreeException
-
getAttribute
- Throws:
IIOInvalidTreeException
-
mergeTree
- Specified by:
mergeTree
in classIIOMetadata
- Throws:
IIOInvalidTreeException
-
mergeNativeTree
- Throws:
IIOInvalidTreeException
-
isISOLatin
-
mergeStandardTree
- Throws:
IIOInvalidTreeException
-
reset
public void reset()- Specified by:
reset
in classIIOMetadata
-
chunkType
-
readNullTerminatedString
- Throws:
IOException
-