The qoi Reference Manual

This is the qoi Reference Manual, version 0.0.1, generated automatically by Declt version 4.0 beta 2 "William Riker" on Sun Dec 15 07:23:05 2024 GMT+0.

Table of Contents


1 Introduction


2 Systems

The main system appears first, followed by any subsystem dependency.


2.1 qoi

Library for encoding/decoding QOI (Quite OK Image Format) files

Author

Bibek Panthi <>

License

MIT

Version

0.0.1

Dependency

alexandria (system).

Source

qoi.asd.

Child Components

3 Files

Files are sorted by type and then listed depth-first from the systems components trees.


3.1 Lisp


3.1.1 qoi/qoi.asd

Source

qoi.asd.

Parent Component

qoi (system).

ASDF Systems

qoi.


3.1.2 qoi/package.lisp

Source

qoi.asd.

Parent Component

qoi (system).

Packages

qoi.


3.1.3 qoi/qoi.lisp

Dependency

package.lisp (file).

Source

qoi.asd.

Parent Component

qoi (system).

Public Interface
Internals

4 Packages

Packages are listed by definition order.


4.1 qoi

Source

package.lisp.

Use List

common-lisp.

Public Interface
Internals

5 Definitions

Definitions are sorted by export status, category, package, and then by lexicographic order.


5.1 Public Interface


5.1.1 Ordinary functions

Function: decode (stream)

decode qoi from ‘stream’ of type (unsigned-byte 8)
Returns ‘image’ : an 1D array with consecutive pixel values
Also returns width, height, channels and colorspace values of the image

Package

qoi.

Source

qoi.lisp.

Function: encode (stream image width height channels colorspace)

encode ‘image’ in ‘qoi’ format; writing to ‘stream’ of type (unsigned-byte 8) ‘image’ is 1D array of size width*height*channels of type (integer 0 255) ‘channels’ = 3 or 4 (i.e. RGB or RGBA)
‘colorspace’ = 1 or 0; This value doesn’t affect the encoding

Package

qoi.

Source

qoi.lisp.


5.2 Internals


5.2.1 Constants

Constant: +qoi-magic+

Magic bytes as integer

Package

qoi.

Source

qoi.lisp.

Constant: +qoi-op-diff+
Package

qoi.

Source

qoi.lisp.

Constant: +qoi-op-luma+
Package

qoi.

Source

qoi.lisp.

Constant: +qoi-op-rgb+
Package

qoi.

Source

qoi.lisp.

Constant: +qoi-op-rgba+
Package

qoi.

Source

qoi.lisp.

Constant: +qoi-op-run+
Package

qoi.

Source

qoi.lisp.


5.2.2 Macros

Macro: copy-array ((from m) (to n) alphap)
Package

qoi.

Source

qoi.lisp.

Macro: setf-array ((last? position array) &rest values)

stores ‘values’ at consecutive position in ‘array’. if last? is false don’t store last value

Package

qoi.

Source

qoi.lisp.


5.2.3 Ordinary functions

Function: read-uint32-be (stream)

Read unsigned 32 bit integer in big endian from stream

Package

qoi.

Source

qoi.lisp.

Function: write-uint32-be (stream int)

Write unsigned 32 bit integer in big endian to stream

Package

qoi.

Source

qoi.lisp.


Appendix A Indexes


A.1 Concepts