C# 클래스 Hjg.Pngcs.Chunks.ChunkRaw

Wraps the raw chunk data
Short lived object, to be created while serialing/deserializing Do not reuse it for different chunks See http://www.libpng.org/pub/png/spec/1.2/PNG-Chunks.html
파일 보기 프로젝트 열기: devedse/DeveMazeGenerator 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
Data byte[]
Id String
IdBytes byte[]
Len int

공개 메소드들

메소드 설명
ToString ( ) : String

Just id and length

setOffset ( long offset ) : void

비공개 메소드들

메소드 설명
AllocData ( ) : void
ChunkRaw ( int length, String idb, bool alloc ) : System

Creates an empty raw chunk

ChunkRaw ( int length, byte idbytes, bool alloc ) : System
ComputeCrc ( ) : int

Called after setting data, before writing to os

GetAsByteStream ( ) : MemoryStream
ReadChunkData ( Stream stream, bool checkCrc ) : int

Position before: just after chunk id. positon after: after crc Data should be already allocated. Checks CRC Return number of byte read.

WriteChunk ( Stream os ) : void

메소드 상세

ToString() 공개 메소드

Just id and length
public ToString ( ) : String
리턴 String

setOffset() 공개 메소드

public setOffset ( long offset ) : void
offset long
리턴 void

프로퍼티 상세

Data 공개적으로 프로퍼티

Raw data, crc not included
public byte[] Data
리턴 byte[]

Id 공개적으로 프로퍼티

public String Id
리턴 String

IdBytes 공개적으로 프로퍼티

Chunk Id, as array of 4 bytes
public byte[] IdBytes
리턴 byte[]

Len 공개적으로 프로퍼티

The length counts only the data field, not itself, the chunk type code, or the CRC. Zero is a valid length. Although encoders and decoders should treat the length as unsigned, its value must not exceed 2^31-1 bytes.
public int Len
리턴 int