class PNGChunks::Reader

Overview

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, ...]

Included Modules

Defined in:

png-chunks.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(io : IO) #

[View source]

Instance Method Detail

def each(&) #
Description copied from module Enumerable(PNGChunks::PNGChunk)

Must yield this collection's elements to the block.


[View source]