Property | Type | Description | |
---|---|---|---|
ImgInfo | Hjg.Pngcs.ImageInfo |
Property | Type | Description | |
---|---|---|---|
filename | String | ||
rowb | byte[] | ||
rowbfilter | byte[] | ||
rowbprev | byte[] |
Method | Description | |
---|---|---|
ComputeCompressionRatio ( ) : double |
Computes compressed size/raw size, approximate Actually: compressed size = total size of IDAT data , raw size = uncompressed pixel bytes = rows * (bytesPerRow + 1) |
|
CopyChunksFirst ( |
||
CopyChunksLast ( |
||
End ( ) : void |
Finalizes the image creation and closes the file stream. This MUST be called after writing the lines. |
|
GetChunksList ( ) : ChunksListForWrite | ||
GetFilename ( ) : String |
Filename or description, from the optional constructor argument.
|
|
GetMetadata ( ) : PngMetadata | ||
IsUnpackedMode ( ) : bool | ||
PngWriter ( Stream outputStream, Hjg.Pngcs.ImageInfo imgInfo ) : System |
Constructs a PngWriter from a outputStream, with no filename information
|
|
PngWriter ( Stream outputStream, Hjg.Pngcs.ImageInfo imgInfo, String filename ) : System |
Constructs a PngWriter from a outputStream, with optional filename or description After construction nothing is writen yet. You still can set some parameters (compression, filters) and queue chunks before start writing the pixels. See also |
|
SetFilterType ( FilterType filterType ) : void |
Sets internal prediction filter type, or strategy to choose it. This must be called just after constructor, before starting writing. Recommended values: DEFAULT (default) or AGGRESIVE |
|
SetUseUnPackedMode ( bool useUnpackedMode ) : void | ||
WriteRow ( Hjg.Pngcs.ImageLine imgline, int rownumber ) : void |
this uses the row number from the imageline!
|
|
WriteRow ( int newrow ) : void | ||
WriteRow ( int newrow, int rown ) : void | ||
WriteRowByte ( byte newrow, int rown ) : void | ||
WriteRowInt ( int newrow, int rown ) : void |
Writes a full image row. This must be called sequentially from n=0 to n=rows-1 One integer per sample , in the natural order: R G B R G B ... (or R G B A R G B A... if has alpha) The values should be between 0 and 255 for 8 bitspc images, and between 0- 65535 form 16 bitspc images (this applies also to the alpha channel if present) The array can be reused. |
|
WriteRowsByte ( byte image ) : void | ||
WriteRowsInt ( int image ) : void |
Method | Description | |
---|---|---|
encodeRowFromByte ( byte row ) : void | ||
encodeRowFromInt ( int row ) : void |
Method | Description | |
---|---|---|
CopyChunks ( |
copy chunks from reader - copy_mask : see ChunksToWrite.COPY_XXX If we are after idat, only considers those chunks after IDAT in PngReader TODO: this should be more customizable
|
|
FilterRow ( int rown ) : void | ||
FilterRowAverage ( ) : void | ||
FilterRowNone ( ) : void | ||
FilterRowPaeth ( ) : void | ||
FilterRowSub ( ) : void | ||
FilterRowUp ( ) : void | ||
SumRowbfilter ( ) : long | ||
WriteEndChunk ( ) : void | ||
WriteFirstChunks ( ) : void | ||
WriteLastChunks ( ) : void | ||
WriteSignatureAndIHDR ( ) : void |
Write id signature and also "IHDR" chunk
|
|
filterAndSend ( int rown ) : void | ||
init ( ) : void |
init: is called automatically before writing the first row
|
|
prepareEncodeRow ( int rown ) : void | ||
reportResultsForFilter ( int rown, FilterType type, bool tentative ) : void |
public CopyChunksFirst ( |
||
reader | ||
copy_mask | int | |
return | void |
public CopyChunksLast ( |
||
reader | ||
copy_mask | int | |
return | void |
public GetChunksList ( ) : ChunksListForWrite | ||
return | ChunksListForWrite |
public PngWriter ( Stream outputStream, Hjg.Pngcs.ImageInfo imgInfo ) : System | ||
outputStream | Stream | |
imgInfo | Hjg.Pngcs.ImageInfo | |
return | System |
public PngWriter ( Stream outputStream, Hjg.Pngcs.ImageInfo imgInfo, String filename ) : System | ||
outputStream | Stream | Opened stream for binary writing |
imgInfo | Hjg.Pngcs.ImageInfo | Basic image parameters |
filename | String | Optional, can be the filename or a description. |
return | System |
public SetFilterType ( FilterType filterType ) : void | ||
filterType | FilterType | One of the five prediction types or strategy to choose it |
return | void |
public SetUseUnPackedMode ( bool useUnpackedMode ) : void | ||
useUnpackedMode | bool | |
return | void |
public WriteRow ( Hjg.Pngcs.ImageLine imgline, int rownumber ) : void | ||
imgline | Hjg.Pngcs.ImageLine | |
rownumber | int | |
return | void |
public WriteRow ( int newrow, int rown ) : void | ||
newrow | int | |
rown | int | |
return | void |
public WriteRowByte ( byte newrow, int rown ) : void | ||
newrow | byte | |
rown | int | |
return | void |
public WriteRowInt ( int newrow, int rown ) : void | ||
newrow | int | Array of pixel values |
rown | int | Number of row, from 0 (top) to rows-1 (bottom) |
return | void |
protected encodeRowFromByte ( byte row ) : void | ||
row | byte | |
return | void |
protected encodeRowFromInt ( int row ) : void | ||
row | int | |
return | void |