Raxol.Terminal.ANSI.PngDecoder (Raxol Terminal v2.6.0)

Copy Markdown View Source

Pure Elixir PNG decoder using :zlib.

Supports 8-bit RGB (color type 2) and RGBA (color type 6) PNGs. Returns pixel data as a flat list of {r, g, b} tuples in row-major order.

Summary

Types

decoded()

@type decoded() :: %{width: pos_integer(), height: pos_integer(), pixels: [pixel()]}

pixel()

@type pixel() :: {byte(), byte(), byte()}

Functions

decode(arg1)

@spec decode(binary()) :: {:ok, decoded()} | {:error, term()}