class

PNGChunks::Reader

Inherits Enumerable < Reference < Object

A class to read PNG data. It's an Enumerable that produces PNGChunks::PNGChunks.

file = File.new("12x34.png")

reader = PNGChunks::Reader.new(file)

puts reader.first.type # => "IHDR"
puts reader.first.data # => Bytes[0x00, 0x00, 0x00, 0x0c, ...]

Constructors

new(io : IO)

Instance methods

each

Must yield this collection's elements to the block.