o
odin.langpkg.dev
packages / library / bif

bif

b0f6df3library

BIF (bad image format) is just for learning and not at all supposed to be close to proper in-use image formats

No license · updated 1 year ago

BIF

Bad Image Format

Note

This project is just meant to be a learning experience

Specification

All bif files must start with "BIF {width} {height}\n" as the header
The data is an unsigned 64bit integer where the first 32bits are number of pixels this data represents, and the next 32bits are RGBA values in 8bits

| no. of pixels | r | g | b | a |
u32 u8 u8 u8 u8

At the end of each row needs to be a newline character

Example

Here is a 10x10 image of red

BIF 10 10
184483840
184483840
184483840
184483840
184483840
184483840
184483840
184483840
184483840
184483840