class

PNG::Chunk

Inherits Reference / Object

Constructors

new(chunk_type : String, io : IO::Sized)
Source

Class methods

read(io : IO, &)
Source
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)
Source
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)
Source
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)
Source

Instance methods

write
Source

Nested types