PngCs  1.1.4
A C# library for read/write PNG images
Public Member Functions | Public Attributes | List of all members
Hjg.Pngcs.Chunks.PngChunkBKGD Class Reference

bKGD chunk, see http://www.w3.org/TR/PNG/#11bKGD More...

Inherits Hjg.Pngcs.Chunks.PngChunkSingle.

Public Member Functions

 PngChunkBKGD (ImageInfo info)
 
override ChunkOrderingConstraint GetOrderingConstraint ()
 Get ordering constrain
 
override ChunkRaw CreateRawChunk ()
 Serialization. Creates a Raw chunk, ready for write, from this chunk content
 
override void ParseFromRaw (ChunkRaw c)
 Deserialization. Given a Raw chunk, just rad, fills this chunk content
 
override void CloneDataFromRead (PngChunk other)
 Override to make a copy (normally deep) from other chunk
 
void SetGray (int gray)
 Set gray value (0-255 if bitdept=8)
 
int GetGray ()
 Gets gray value
 
void SetPaletteIndex (int index)
 Set pallette index - only for indexed
 
int GetPaletteIndex ()
 Get pallette index - only for indexed
 
void SetRGB (int r, int g, int b)
 Sets rgb value, only for rgb images
 
int[] GetRGB ()
 Gets rgb value, only for rgb images
 
- Public Member Functions inherited from Hjg.Pngcs.Chunks.PngChunkSingle
 PngChunkSingle (String id, ImageInfo imgInfo)
 
sealed override bool AllowsMultiple ()
 This is implemented in PngChunkMultiple/PngChunSingle
 
override int GetHashCode ()
 
override bool Equals (object obj)
 
- Public Member Functions inherited from Hjg.Pngcs.Chunks.PngChunk
ChunkRaw createEmptyChunk (int len, bool alloc)
 
override String ToString ()
 Basic info: Id, length, Type name
 

Public Attributes

const String ID = ChunkHelper.bKGD
 

Additional Inherited Members

- Public Types inherited from Hjg.Pngcs.Chunks.PngChunk
enum  ChunkOrderingConstraint {
  NONE, BEFORE_PLTE_AND_IDAT, AFTER_PLTE_BEFORE_IDAT, BEFORE_IDAT,
  NA
}
 Restrictions for chunk ordering, for ancillary chunks More...
 
- Static Public Member Functions inherited from Hjg.Pngcs.Chunks.PngChunk
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)
 
- Protected Member Functions inherited from Hjg.Pngcs.Chunks.PngChunk
 PngChunk (String id, ImageInfo imgInfo)
 Constructs an empty chunk
 
- Protected Attributes inherited from Hjg.Pngcs.Chunks.PngChunk
readonly ImageInfo ImgInfo
 Image basic info, mostly for some checks
 
- Properties inherited from Hjg.Pngcs.Chunks.PngChunk
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]
 

Detailed Description

bKGD chunk, see http://www.w3.org/TR/PNG/#11bKGD

Constructor & Destructor Documentation

Hjg.Pngcs.Chunks.PngChunkBKGD.PngChunkBKGD ( ImageInfo  info)

Member Function Documentation

override ChunkOrderingConstraint Hjg.Pngcs.Chunks.PngChunkBKGD.GetOrderingConstraint ( )
virtual

Get ordering constrain

Returns

Implements Hjg.Pngcs.Chunks.PngChunk.

override ChunkRaw Hjg.Pngcs.Chunks.PngChunkBKGD.CreateRawChunk ( )
virtual

Serialization. Creates a Raw chunk, ready for write, from this chunk content

Implements Hjg.Pngcs.Chunks.PngChunk.

override void Hjg.Pngcs.Chunks.PngChunkBKGD.ParseFromRaw ( ChunkRaw  c)
virtual

Deserialization. Given a Raw chunk, just rad, fills this chunk content

Implements Hjg.Pngcs.Chunks.PngChunk.

override void Hjg.Pngcs.Chunks.PngChunkBKGD.CloneDataFromRead ( PngChunk  other)
virtual

Override to make a copy (normally deep) from other chunk

Parameters
other

Implements Hjg.Pngcs.Chunks.PngChunk.

void Hjg.Pngcs.Chunks.PngChunkBKGD.SetGray ( int  gray)

Set gray value (0-255 if bitdept=8)

Parameters
gray
int Hjg.Pngcs.Chunks.PngChunkBKGD.GetGray ( )

Gets gray value

Returns
gray value (0-255 if bitdept=8)
void Hjg.Pngcs.Chunks.PngChunkBKGD.SetPaletteIndex ( int  index)

Set pallette index - only for indexed

Parameters
index
int Hjg.Pngcs.Chunks.PngChunkBKGD.GetPaletteIndex ( )

Get pallette index - only for indexed

Returns
void Hjg.Pngcs.Chunks.PngChunkBKGD.SetRGB ( int  r,
int  g,
int  b 
)

Sets rgb value, only for rgb images

Parameters
r
g
b
int [] Hjg.Pngcs.Chunks.PngChunkBKGD.GetRGB ( )

Gets rgb value, only for rgb images

Returns
[r , g, b] array

Member Data Documentation

const String Hjg.Pngcs.Chunks.PngChunkBKGD.ID = ChunkHelper.bKGD