package

codeberg.org/EvanHahn/crystal-png-chunks

main / published Dec 8, 2025 / repository

A Crystal shard offering low-level access to PNG data.

Crystal PNG chunks

A Crystal shard offering low-level access to PNG data.

Installation

  1. Add the dependency to your shard.yml:

    dependencies:
      png-chunks:
        codeberg: EvanHahn/crystal-png-chunks
  2. Run shards install.

Usage

require "png-chunks"

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

reader = PNGChunk::Reader.new(file)

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

API

  • PNGChunks

    The PNGChunks module provides low-level access to reading PNG data.