项目作者: nafc

项目描述 :
nafc image format
高级语言: Rust
项目地址: git://github.com/nafc/nif.git
创建时间: 2017-04-29T14:26:02Z
项目社区:https://github.com/nafc/nif

开源协议:

下载


nif

Nafc image format

Specifications

First 3 bytes are an identifier, these bytes are in hex
6e 69 66

1 byte width then 1 byte height, the width/height is equal the the value of the byte plus one.

The following n bytes, n being defined as width*height, are pixels referring to the palette.

Then the palette is the rest of the file.

byte meaning comment
0-2 File identifier always 6e 69 66
3 Width width = value + 1
4 Height height = value +1
5-? Pixels Each bytes refers to a palette value. e.g. the first color in the palette is value 0.
?-end Palette The length of this palette has to be a multiple of 3 because one color is 3 bytes. e. g. every 3 bytes is one color.