Class PngChunkType


  • public class PngChunkType
    extends java.lang.Object
    • Field Detail

      • _identifiersAllowingMultiples

        private static final java.util.Set<java.lang.String> _identifiersAllowingMultiples
      • IHDR

        public static final PngChunkType IHDR
        Denotes a critical PngChunk that 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 PngColorType enum
        • 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

        public static final PngChunkType PLTE
        Denotes a critical PngChunk that contains palette entries. This chunk should only appear for a PngColorType of IndexedColor, 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
        The number of entries is determined by the chunk length. A chunk length indivisible by three is an error.
      • tEXt

        public static final PngChunkType tEXt
        Denotes an ancillary PngChunk that 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
        Text is interpreted according to the Latin-1 character set [ISO-8859-1]. Newlines should be represented by a single linefeed character (0x9).
      • _bytes

        private final byte[] _bytes
      • _multipleAllowed

        private final boolean _multipleAllowed
    • Method Detail

      • isCritical

        public boolean isCritical()
      • isAncillary

        public boolean isAncillary()
      • isPrivate

        public boolean isPrivate()
      • isSafeToCopy

        public boolean isSafeToCopy()
      • areMultipleAllowed

        public boolean areMultipleAllowed()
      • isLowerCase

        private static boolean isLowerCase​(byte b)
      • isUpperCase

        private static boolean isUpperCase​(byte b)
      • isValidByte

        private static boolean isValidByte​(byte b)
      • getIdentifier

        public java.lang.String getIdentifier()
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • equals

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object