PngCs
1.1.4
A C# library for read/write PNG images
|
Represents a instance of a PNG chunk More...
Inherited by Hjg.Pngcs.Chunks.PngChunkMultiple, Hjg.Pngcs.Chunks.PngChunkSingle, and Hjg.Pngcs.Chunks.PngChunkSkipped.
Public Types | |
enum | ChunkOrderingConstraint { NONE, BEFORE_PLTE_AND_IDAT, AFTER_PLTE_BEFORE_IDAT, BEFORE_IDAT, NA } |
Restrictions for chunk ordering, for ancillary chunks More... | |
Public Member Functions | |
ChunkRaw | createEmptyChunk (int len, bool alloc) |
override String | ToString () |
Basic info: Id, length, Type name | |
abstract ChunkRaw | CreateRawChunk () |
Serialization. Creates a Raw chunk, ready for write, from this chunk content | |
abstract void | ParseFromRaw (ChunkRaw c) |
Deserialization. Given a Raw chunk, just rad, fills this chunk content | |
abstract void | CloneDataFromRead (PngChunk other) |
Override to make a copy (normally deep) from other chunk | |
abstract bool | AllowsMultiple () |
This is implemented in PngChunkMultiple/PngChunSingle | |
abstract ChunkOrderingConstraint | GetOrderingConstraint () |
Get ordering constrain | |
Static Public Member Functions | |
static void | FactoryRegister (String chunkId, Type type) |
Registers a Chunk ID in the factory, to instantiate a given type | |
static T | CloneChunk< T > (T chunk, ImageInfo info) |
Public Attributes | |
readonly String | Id |
4 letters. The Id almost determines the concrete type (except for PngUKNOWN) | |
readonly bool | Crit |
Standard basic properties, implicit in the Id | |
Protected Member Functions | |
PngChunk (String id, ImageInfo imgInfo) | |
Constructs an empty chunk | |
Protected Attributes | |
readonly ImageInfo | ImgInfo |
Image basic info, mostly for some checks | |
Properties | |
bool | Priority [get, set] |
For writing. Queued chunks with high priority will be written as soon as possible | |
int | ChunkGroup [get, set] |
Chunk group where it was read or writen | |
int | Length [get, set] |
long | Offset [get, set] |
Represents a instance of a PNG chunk
Concrete classes should extend PngChunkSingle
or PngChunkMultiple
Note that some methods/fields are type-specific (GetOrderingConstraint(), AllowsMultiple()) some are 'almost' type-specific (Id,Crit,Pub,Safe; the exception is PngUKNOWN
), and some are instance-specific
Restrictions for chunk ordering, for ancillary chunks
|
protected |
Constructs an empty chunk
id | |
imgInfo |
|
static |
Registers a Chunk ID in the factory, to instantiate a given type
This can be called by client code to register additional chunk types
chunkId | |
type | should extend PngChunkSingle or PngChunkMultiple |
ChunkRaw Hjg.Pngcs.Chunks.PngChunk.createEmptyChunk | ( | int | len, |
bool | alloc | ||
) |
|
static |
T | : | PngChunk |
override String Hjg.Pngcs.Chunks.PngChunk.ToString | ( | ) |
Basic info: Id, length, Type name
|
pure virtual |
Serialization. Creates a Raw chunk, ready for write, from this chunk content
Implemented in Hjg.Pngcs.Chunks.PngChunkSBIT, Hjg.Pngcs.Chunks.PngChunkSPLT, Hjg.Pngcs.Chunks.PngChunkPLTE, Hjg.Pngcs.Chunks.PngChunkIHDR, Hjg.Pngcs.Chunks.PngChunkSRGB, Hjg.Pngcs.Chunks.PngChunkPHYS, Hjg.Pngcs.Chunks.PngChunkUNKNOWN, Hjg.Pngcs.Chunks.PngChunkBKGD, Hjg.Pngcs.Chunks.PngChunkCHRM, Hjg.Pngcs.Chunks.PngChunkICCP, Hjg.Pngcs.Chunks.PngChunkSTER, Hjg.Pngcs.Chunks.PngChunkOFFS, Hjg.Pngcs.Chunks.PngChunkTRNS, Hjg.Pngcs.Chunks.PngChunkHIST, Hjg.Pngcs.Chunks.PngChunkIDAT, Hjg.Pngcs.Chunks.PngChunkGAMA, Hjg.Pngcs.Chunks.PngChunkTIME, Hjg.Pngcs.Chunks.PngChunkITXT, Hjg.Pngcs.Chunks.PngChunkIEND, Hjg.Pngcs.Chunks.PngChunkTEXT, Hjg.Pngcs.Chunks.PngChunkZTXT, and Hjg.Pngcs.Chunks.PngChunkSkipped.
|
pure virtual |
Deserialization. Given a Raw chunk, just rad, fills this chunk content
Implemented in Hjg.Pngcs.Chunks.PngChunkSPLT, Hjg.Pngcs.Chunks.PngChunkPLTE, Hjg.Pngcs.Chunks.PngChunkITXT, Hjg.Pngcs.Chunks.PngChunkTRNS, Hjg.Pngcs.Chunks.PngChunkBKGD, Hjg.Pngcs.Chunks.PngChunkIHDR, Hjg.Pngcs.Chunks.PngChunkPHYS, Hjg.Pngcs.Chunks.PngChunkCHRM, Hjg.Pngcs.Chunks.PngChunkHIST, Hjg.Pngcs.Chunks.PngChunkICCP, Hjg.Pngcs.Chunks.PngChunkSRGB, Hjg.Pngcs.Chunks.PngChunkTIME, Hjg.Pngcs.Chunks.PngChunkOFFS, Hjg.Pngcs.Chunks.PngChunkUNKNOWN, Hjg.Pngcs.Chunks.PngChunkSBIT, Hjg.Pngcs.Chunks.PngChunkSTER, Hjg.Pngcs.Chunks.PngChunkZTXT, Hjg.Pngcs.Chunks.PngChunkGAMA, Hjg.Pngcs.Chunks.PngChunkTEXT, Hjg.Pngcs.Chunks.PngChunkIDAT, Hjg.Pngcs.Chunks.PngChunkIEND, and Hjg.Pngcs.Chunks.PngChunkSkipped.
|
pure virtual |
Override to make a copy (normally deep) from other chunk
other |
Implemented in Hjg.Pngcs.Chunks.PngChunkSPLT, Hjg.Pngcs.Chunks.PngChunkITXT, Hjg.Pngcs.Chunks.PngChunkSBIT, Hjg.Pngcs.Chunks.PngChunkTRNS, Hjg.Pngcs.Chunks.PngChunkIHDR, Hjg.Pngcs.Chunks.PngChunkBKGD, Hjg.Pngcs.Chunks.PngChunkCHRM, Hjg.Pngcs.Chunks.PngChunkPLTE, Hjg.Pngcs.Chunks.PngChunkZTXT, Hjg.Pngcs.Chunks.PngChunkUNKNOWN, Hjg.Pngcs.Chunks.PngChunkHIST, Hjg.Pngcs.Chunks.PngChunkICCP, Hjg.Pngcs.Chunks.PngChunkOFFS, Hjg.Pngcs.Chunks.PngChunkTIME, Hjg.Pngcs.Chunks.PngChunkSRGB, Hjg.Pngcs.Chunks.PngChunkTEXT, Hjg.Pngcs.Chunks.PngChunkSTER, Hjg.Pngcs.Chunks.PngChunkGAMA, Hjg.Pngcs.Chunks.PngChunkPHYS, Hjg.Pngcs.Chunks.PngChunkIDAT, Hjg.Pngcs.Chunks.PngChunkIEND, and Hjg.Pngcs.Chunks.PngChunkSkipped.
|
pure virtual |
This is implemented in PngChunkMultiple/PngChunSingle
Implemented in Hjg.Pngcs.Chunks.PngChunkMultiple, Hjg.Pngcs.Chunks.PngChunkSingle, and Hjg.Pngcs.Chunks.PngChunkSkipped.
|
pure virtual |
Get ordering constrain
Implemented in Hjg.Pngcs.Chunks.PngChunkTextVar, Hjg.Pngcs.Chunks.PngChunkSPLT, Hjg.Pngcs.Chunks.PngChunkPLTE, Hjg.Pngcs.Chunks.PngChunkSBIT, Hjg.Pngcs.Chunks.PngChunkSkipped, Hjg.Pngcs.Chunks.PngChunkIHDR, Hjg.Pngcs.Chunks.PngChunkSRGB, Hjg.Pngcs.Chunks.PngChunkPHYS, Hjg.Pngcs.Chunks.PngChunkBKGD, Hjg.Pngcs.Chunks.PngChunkCHRM, Hjg.Pngcs.Chunks.PngChunkSTER, Hjg.Pngcs.Chunks.PngChunkTRNS, Hjg.Pngcs.Chunks.PngChunkUNKNOWN, Hjg.Pngcs.Chunks.PngChunkICCP, Hjg.Pngcs.Chunks.PngChunkOFFS, Hjg.Pngcs.Chunks.PngChunkHIST, Hjg.Pngcs.Chunks.PngChunkIDAT, Hjg.Pngcs.Chunks.PngChunkGAMA, Hjg.Pngcs.Chunks.PngChunkTIME, and Hjg.Pngcs.Chunks.PngChunkIEND.
readonly String Hjg.Pngcs.Chunks.PngChunk.Id |
4 letters. The Id almost determines the concrete type (except for PngUKNOWN)
readonly bool Hjg.Pngcs.Chunks.PngChunk.Crit |
Standard basic properties, implicit in the Id
|
protected |
Image basic info, mostly for some checks
|
getset |
For writing. Queued chunks with high priority will be written as soon as possible
|
getset |
Chunk group where it was read or writen
|
getset |
|
getset |