Class PngChunkIccp
- java.lang.Object
-
- org.apache.commons.imaging.common.BinaryFileParser
-
- org.apache.commons.imaging.formats.png.chunks.PngChunk
-
- org.apache.commons.imaging.formats.png.chunks.PngChunkIccp
-
public final class PngChunkIccp extends PngChunk
The PNG iCCP chunk. If "present, the image samples conform to the color space represented by the embedded ICC profile as defined by the International Color Consortium".- See Also:
- PNG Specification
-
-
Field Summary
Fields Modifier and Type Field Description private byte[]compressedProfileCompressed profile data.private intcompressionMethodCompression method.private static java.util.logging.LoggerLOGGERprivate java.lang.StringprofileNameICC profile name.private byte[]uncompressedProfileUncompressed profile data.
-
Constructor Summary
Constructors Constructor Description PngChunkIccp(int length, int chunkType, int crc, byte[] bytes)Constructs a new instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description byte[]getCompressedProfile()intgetCompressionMethod()java.lang.StringgetProfileName()byte[]getUncompressedProfile()Gets a copy of the uncompressed profile data.-
Methods inherited from class org.apache.commons.imaging.formats.png.chunks.PngChunk
getBytes, getChunkType, getCrc, getDataStream, getLength, getPropertyBits, isAncillary, isPrivate, isReserved, isSafeToCopy
-
Methods inherited from class org.apache.commons.imaging.common.BinaryFileParser
debugNumber, debugNumber, getByteOrder, setByteOrder
-
-
-
-
Field Detail
-
LOGGER
private static final java.util.logging.Logger LOGGER
-
profileName
private final java.lang.String profileName
ICC profile name.
-
compressionMethod
private final int compressionMethod
Compression method.
-
compressedProfile
private final byte[] compressedProfile
Compressed profile data.
-
uncompressedProfile
private final byte[] uncompressedProfile
Uncompressed profile data.
-
-
Constructor Detail
-
PngChunkIccp
public PngChunkIccp(int length, int chunkType, int crc, byte[] bytes) throws ImagingException, java.io.IOExceptionConstructs a new instance.- Parameters:
length- chunk lengthchunkType- chunk typecrc- CRC computed over the chunk type and chunk data (but not the length)bytes- chunk data bytes- Throws:
ImagingException- when no profile name is presentjava.io.IOException- when an error happens while reading the profile data
-
-
Method Detail
-
getCompressedProfile
public byte[] getCompressedProfile()
-
getCompressionMethod
public int getCompressionMethod()
-
getProfileName
public java.lang.String getProfileName()
-
getUncompressedProfile
public byte[] getUncompressedProfile()
Gets a copy of the uncompressed profile data.- Returns:
- the uncompressed profile data
-
-