PTF

Format

  • Current version is 0.0
  • File extension is .ptf
  • Data is little endian
  • LZ4 is used for compression
TypeDescription
"Header"File header
"Data"Image data

TypeValueDescription
char[3]{'P', 'T', 'F'}Header magic
u80Major version
u8Header info byteFlags and resolution
Header info byte
Bit (Listed from LSB to MSB)ValueDescription
1-4Resolution
5Has alpha
6-80Reserved

Data

TypeDescription
Compressed {"RGB pixel"|"RGBA pixel"}[0...]Compressed pixels

RGB pixel

TypeDescription
u8[3]RGB

RGBA pixel

TypeDescription
u8[4]RGBA