public class PixelsWriterDefault extends PixelsWriter
Modifier and Type | Field and Description |
---|---|
protected int |
adaptMaxSkip
parameters for adaptive strategy
|
protected int |
adaptNextRow |
protected double |
adaptSkipIncreaseFactor |
protected int |
adaptSkipIncreaseSinceRow |
protected FilterType |
curfilterType
currently concrete selected filter type
|
protected FiltersPerformance |
filtersPerformance
evaluates different filters, for adaptive strategy
|
protected byte[] |
rowb
current raw row
|
protected byte[] |
rowbfilter
buffer for filtered row
|
protected byte[] |
rowbprev
previous raw row
|
buflen, bytesPixel, bytesRow, currentRow, deflaterCompLevel, deflaterStrategy, filterType, imgInfo, initdone
Constructor and Description |
---|
PixelsWriterDefault(ImageInfo imgInfo) |
Modifier and Type | Method and Description |
---|---|
void |
close()
cleanup.
|
protected void |
decideCurFilterType() |
protected void |
filterAndWrite(byte[] rowb)
This does the filtering and send to stream.
|
byte[] |
getRowb()
This will be called by the PngWrite to fill the raw pixels for each row.
|
protected void |
initParams()
called by init(); override (calling this first) to do additional initialization
|
void |
setFilterWeights(double[] weights)
Only for adaptive strategies.
|
void |
setPreferenceForNone(double preferenceForNone)
Only for adaptive strategies.
|
void |
tuneMemory(double m)
Only for adaptive strategies.
|
filterRowWithFilterType, getCompression, getDefaultFilter, getDeflaterCompLevel, getFiltersUsed, getFilterType, getOs, getTotalBytesToWrite, init, isDone, processRow, sendToCompressedStream, setCompressorStream, setDeflaterCompLevel, setDeflaterStrategy, setFilterType, setIdatMaxSize, setOs
protected byte[] rowb
protected byte[] rowbprev
protected byte[] rowbfilter
protected FiltersPerformance filtersPerformance
protected FilterType curfilterType
protected int adaptMaxSkip
protected int adaptSkipIncreaseSinceRow
protected double adaptSkipIncreaseFactor
protected int adaptNextRow
public PixelsWriterDefault(ImageInfo imgInfo)
protected void initParams()
PixelsWriter
initParams
in class PixelsWriter
protected void filterAndWrite(byte[] rowb)
PixelsWriter
PixelsWriter.filterRowWithFilterType(FilterType, byte[], byte[], byte[])
and and
PixelsWriter.sendToCompressedStream(byte[])
filterAndWrite
in class PixelsWriter
protected void decideCurFilterType()
public byte[] getRowb()
PixelsWriter
getRowb
in class PixelsWriter
public void close()
PixelsWriter
close
in class PixelsWriter
public void setPreferenceForNone(double preferenceForNone)
FiltersPerformance.setPreferenceForNone(double)
public void tuneMemory(double m)
FiltersPerformance.tuneMemory(double)
public void setFilterWeights(double[] weights)
FiltersPerformance.setFilterWeights(double[])
Copyright © 2014. All rights reserved.