public class PngReaderApng extends PngReaderByte
Modifier and Type | Field and Description |
---|---|
protected PngChunkACTL |
actlChunk |
protected int |
frameNum
Current frame number (reading or read).
|
chunkseq, imgInfo, imlinesSet, interlaced, MAX_BYTES_METADATA_DEFAULT, MAX_CHUNK_SIZE_SKIP, MAX_TOTAL_BYTES_READ_DEFAULT, metadata, rowNum, streamFeeder
Constructor and Description |
---|
PngReaderApng(File file) |
PngReaderApng(InputStream inputStream) |
Modifier and Type | Method and Description |
---|---|
void |
advanceToFrame(int frame) |
protected ChunkSeqReaderPng |
createChunkSeqReader()
called on construction time.
|
void |
end()
Reads till end of PNG stream and call close()
This should normally be called after reading the pixel data, to read the trailing chunks and close the stream.
|
int |
getApngNumFrames()
Only counts true animation frames.
|
int |
getApngNumPlays()
0 if it's to been played infinitely.
|
PngChunkFCTL |
getFctl() |
int |
getFrameNum() |
boolean |
hasExtraStillImage()
True if it has a default image (IDAT) that is not part of the animation.
|
boolean |
hasMoreRows()
True if last row has not yet been read
|
boolean |
isApng() |
IImageLine |
readRow()
Reads next row.
|
IImageLine |
readRow(int nrow)
The row number is mostly meant as a check, the rows must be called in ascending order (not necessarily consecutive)
|
IImageLineSet<? extends IImageLine> |
readRows()
Reads all rows in a ImageLineSet This is handy, but less memory-efficient (except for interlaced)
|
IImageLineSet<? extends IImageLine> |
readRows(int nRows,
int rowOffset,
int rowStep)
Reads a subset of rows.
|
void |
readSkippingAllRows()
Reads all the (remaining) file, skipping the pixels data.
|
readRowByte
addChunkToSkip, close, createLineSet, dontSkipChunk, getChunkseq, getChunksList, getChunksList, getCurImgInfo, getImgInfo, getMetadata, getSimpleDigestHex, isInterlaced, loadAllInterlaced, prepareSimpleDigestComputation, readFirstChunks, setChunkLoadBehaviour, setChunksToSkip, setCrcCheckDisabled, setLineSetFactory, setMaxBytesMetadata, setMaxTotalBytesRead, setShouldCloseStream, setSkipChunkMaxSize, toString, toStringCompact
protected PngChunkACTL actlChunk
protected int frameNum
public PngReaderApng(File file)
public PngReaderApng(InputStream inputStream)
public boolean isApng()
public void advanceToFrame(int frame)
public boolean hasExtraStillImage()
public int getApngNumFrames()
public int getApngNumPlays()
public IImageLine readRow()
PngReader
public boolean hasMoreRows()
PngReader
hasMoreRows
in class PngReader
public IImageLine readRow(int nrow)
PngReader
public IImageLineSet<? extends IImageLine> readRows()
PngReader
public IImageLineSet<? extends IImageLine> readRows(int nRows, int rowOffset, int rowStep)
PngReader
This method should called once, and not be mixed with PngReader.readRow()
public void readSkippingAllRows()
PngReader
PngReader.readRow()
, specially for big files (about 10 times faster!), because it doesn't even decompress the IDAT
stream and disables CRC check Use this if you are not interested in reading pixels,only metadata.readSkippingAllRows
in class PngReader
protected ChunkSeqReaderPng createChunkSeqReader()
PngReader
createChunkSeqReader
in class PngReader
public int getFrameNum()
frameNum
public void end()
PngReader
public PngChunkFCTL getFctl()
Copyright © 2014. All rights reserved.