class PNG::Chunk

Defined in:

png/chunk.cr

Constructors

Class Method Summary

Instance Method Summary

Constructor Detail

def self.new(chunk_type : String, io : IO::Sized) #

[View source]

Class Method Detail

def self.read(io : IO, &) #

[View source]
def self.write(chunk_type : String, io : IO, data : Bytes) #

Write a chunk to the PNG stream Each chunk consists of

  • Length of data (UInt32)
  • Chunk type (String 4 chars)
  • Data (Bytes)
  • CRC32 chucksum (4 bytes)

[View source]
def self.write(chunk_type : String, io : IO, size : UInt32, &block : IO -> Nil) #

Write a chunk to the PNG stream Each chunk consists of

  • Length of data (UInt32)
  • Chunk type (String 4 chars)
  • Data (Bytes)
  • CRC32 chucksum (4 bytes)

[View source]
def self.write(chunk_type : String, io : IO, &block : IO -> Nil) #

Write a chunk to the PNG stream Each chunk consists of

  • Length of data (UInt32)
  • Chunk type (String 4 chars)
  • Data (Bytes)
  • CRC32 chucksum (4 bytes)

[View source]

Instance Method Detail

def write #

[View source]