Package com.drew.imaging.png
Class PngChunkType
java.lang.Object
com.drew.imaging.png.PngChunkType
- Author:
- Drew Noakes https://drewnoakes.com
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final PngChunkTypestatic final PngChunkTypestatic final PngChunkTypestatic final PngChunkTypestatic final PngChunkTypestatic final PngChunkTypestatic final PngChunkTypestatic final PngChunkTypestatic final PngChunkTypeDenotes a criticalPngChunkthat contains basic information about the PNG image.static final PngChunkTypestatic final PngChunkTypestatic final PngChunkTypeDenotes a criticalPngChunkthat contains palette entries.static final PngChunkTypestatic final PngChunkTypestatic final PngChunkTypestatic final PngChunkTypeDenotes an ancillaryPngChunkthat contains textual data, having first a keyword and then a value.static final PngChunkTypestatic final PngChunkTypestatic final PngChunkType -
Constructor Summary
ConstructorsConstructorDescriptionPngChunkType(byte[] bytes) PngChunkType(String identifier) PngChunkType(String identifier, boolean multipleAllowed) -
Method Summary
-
Field Details
-
IHDR
Denotes a criticalPngChunkthat contains basic information about the PNG image. This must be the first chunk in the data sequence, and may only occur once.The format is:
- pixel width 4 bytes, unsigned and greater than zero
- pixel height 4 bytes, unsigned and greater than zero
- bit depth 1 byte, number of bits per sample or per palette index (not per pixel)
- color type 1 byte, maps to
PngColorTypeenum - compression method 1 byte, currently only a value of zero (deflate/inflate) is in the standard
- filter method 1 byte, currently only a value of zero (adaptive filtering with five basic filter types) is in the standard
- interlace method 1 byte, indicates the transmission order of image data, currently only 0 (no interlace) and 1 (Adam7 interlace) are in the standard
-
PLTE
Denotes a criticalPngChunkthat contains palette entries. This chunk should only appear for aPngColorTypeofIndexedColor, and may only occur once in the PNG data sequence.The chunk contains between one and 256 entries, each of three bytes:
- red 1 byte
- green 1 byte
- blue 1 byte
-
IDAT
-
IEND
-
cHRM
-
gAMA
-
iCCP
-
sBIT
-
sRGB
-
bKGD
-
hIST
-
tRNS
-
pHYs
-
sPLT
-
tIME
-
iTXt
-
eXIf
-
tEXt
Denotes an ancillaryPngChunkthat contains textual data, having first a keyword and then a value. If multiple text data keywords are needed, then multiple chunks are included in the PNG data stream.The format is:
- keyword 1-79 bytes
- null separator 1 byte (\0)
- text string 0 or more bytes
-
zTXt
-
-
Constructor Details
-
PngChunkType
- Throws:
PngProcessingException
-
PngChunkType
- Throws:
PngProcessingException
-
PngChunkType
- Throws:
PngProcessingException
-
-
Method Details
-
isCritical
public boolean isCritical() -
isAncillary
public boolean isAncillary() -
isPrivate
public boolean isPrivate() -
isSafeToCopy
public boolean isSafeToCopy() -
areMultipleAllowed
public boolean areMultipleAllowed() -
getIdentifier
-
toString
-
equals
-
hashCode
public int hashCode()
-