public class IdatSet extends DeflatedChunksSet
It extends DeflatedChunksSet, adding the intelligence to unfilter
rows, and to understand row lenghts in terms of ImageInfo and (eventually)
Deinterlacer
| Modifier and Type | Field and Description |
|---|---|
protected ar.com.hjg.pngj.Deinterlacer |
deinterlacer |
protected ImageInfo |
imgInfo |
protected byte[] |
rowUnfiltered |
protected byte[] |
rowUnfilteredPrev |
chunkid, row| Constructor and Description |
|---|
IdatSet(String id,
ImageInfo iminfo,
ar.com.hjg.pngj.Deinterlacer deinterlacer) |
IdatSet(String id,
ImageInfo iminfo,
ar.com.hjg.pngj.Deinterlacer deinterlacer,
Inflater inf,
byte[] buffer)
Special constructor with preallocated buffer.
|
| Modifier and Type | Method and Description |
|---|---|
int |
advanceToNextRow()
Signals that we are done with the previous row, begin reading the next
one.
|
ar.com.hjg.pngj.Deinterlacer |
getDeinterlacer() |
byte[] |
getUnfilteredRow()
Unfiltered row.
|
boolean |
isRowReady()
In this state, the object is waiting the caller to retrieve inflated data
|
protected void |
preProcessRow()
does the unfiltering of the inflated row, and updates row info
|
protected int |
processRowCallback()
Method for async/callback mode .
|
void |
unfilterRow()
Applies PNG un-filter to inflated raw line.
|
protected void |
unfilterRow(int nbytes) |
allowOtherChunksInBetween, appendNewChunk, end, getInflatedRow, getnFedBytes, getRowFilled, getRowLen, getRown, isCallbackMode, isDone, isWaitingForMoreInput, prepareForNextRow, processBytes, setCallbackMode, toStringprotected byte[] rowUnfiltered
protected byte[] rowUnfilteredPrev
protected final ImageInfo imgInfo
protected final ar.com.hjg.pngj.Deinterlacer deinterlacer
public IdatSet(String id, ImageInfo iminfo, ar.com.hjg.pngj.Deinterlacer deinterlacer)
id - Chunk id (first chunk), should be shared by all concatenated
chunksiminfo - Image infodeinterlacer - Not null if interlacedpublic IdatSet(String id, ImageInfo iminfo, ar.com.hjg.pngj.Deinterlacer deinterlacer, Inflater inf, byte[] buffer)
Same as IdatSet(String, ImageInfo, Deinterlacer), but you can
pass a Inflater (will be reset internally), and a buffer (will be used
only if size is enough)
public void unfilterRow()
getUnfilteredRow() DeflatedChunksSet.getRowLen()protected void unfilterRow(int nbytes)
protected void preProcessRow()
preProcessRow in class DeflatedChunksSetprotected int processRowCallback()
In callback mode will be called as soon as each row is retrieved
(inflated and unfiltered), after preProcessRow()
This is a dummy implementation that does nothing.
The return value is essential
processRowCallback in class DeflatedChunksSetpublic int advanceToNextRow()
In polled mode, calls setNextRowLen()
Warning: after calling this, the unfilterRow is invalid!
public boolean isRowReady()
DeflatedChunksSet
Effective length: see DeflatedChunksSet.getRowFilled()
isRowReady in class DeflatedChunksSetpublic byte[] getUnfilteredRow()
This should be called only if isRowReady() returns true.
To get real length, use DeflatedChunksSet.getRowLen()
public ar.com.hjg.pngj.Deinterlacer getDeinterlacer()
Copyright © 2013. All rights reserved.