PTF

Table of contents


Format

  • Current version is 0.0
  • File extension is .ptf
  • Data is little endian
  • LZ4F is used for compression
TypeDescription
HeaderFile header
DataImage data

TypeValueDescription
char[3]{'P', 'T', 'F'}Header magic
u80Major version
u8Header info byteFlags and resolution
Header info byte
Bits (MSB to LSB)ValueDescription
7..50Reserved
4Has alpha
3..0Resolution

Data

TypeValueDescription
u8[]Compressed ‘RGB pixel × 1…’ or ‘RGBA pixel × 1…’Pixel data

RGB pixel

TypeDescription
u8[3]RGB

RGBA pixel

TypeDescription
u8[4]RGBA