class ChunkyPNG::Chunk::Header

def self.read(type, content)

Returns:
  • (ChunkyPNG::Chunk::End) - The new Header chunk instance with the

Parameters:
  • content (String) -- The 13 bytes of content read from the chunk.
  • type (String) -- The four character chunk type indicator (= "IHDR").
def self.read(type, content)
  fields = content.unpack("NNC5")
  new(
    width: fields[0],
    height: fields[1],
    depth: fields[2],
    color: fields[3],
    compression: fields[4],
    filtering: fields[5],
    interlace: fields[6]
  )
end