References
ASE files use Intel (little-endian) byte order.BYTE: An 8-bit unsigned integer valueWORD: A 16-bit unsigned integer valueSHORT: A 16-bit signed integer valueDWORD: A 32-bit unsigned integer valueLONG: A 32-bit signed integer valueFIXED: A 32-bit fixed point (16.16) valueFLOAT: A 32-bit single-precision valueDOUBLE: A 64-bit double-precision valueQWORD: A 64-bit unsigned integer valueLONG64: A 64-bit signed integer valueBYTE[n]: “n” bytesSTRING:WORD: string length (number of bytes)BYTE[length]: characters (in UTF-8)- The
'\0'character is not included
POINT:LONG: X coordinate valueLONG: Y coordinate value
SIZE:LONG: Width valueLONG: Height value
RECT:POINT: Origin coordinatesSIZE: Rectangle size
PIXEL: One pixel, depending on the image pixel format:- RGBA:
BYTE[4], each pixel have 4 bytes in this order Red, Green, Blue, Alpha - Grayscale:
BYTE[2], each pixel have 2 bytes in the order Value, Alpha - Indexed:
BYTE, each pixel uses 1 byte (the index)
- RGBA:
TILE: Tilemaps: Each tile can be a 8-bit (BYTE), 16-bit (WORD), or 32-bit (DWORD) value and there are masks related to the meaning of each bitUUID: A Universally Unique Identifier stored asBYTE[16]
Introduction
The format is much like FLI/FLC files, but with different magic number and different chunks. Also, the color depth can be 8, 16 or 32 for Indexed, Grayscale and RGB respectively, and images are compressed with zlib. Color palettes are in FLI color chunks (it could be type=11 or type=4). For color depths more than 8bpp, palettes are optional. To read the sprite:- Read the ASE header
- For each frame:
- Read the frame header
- For each chunk in this frame:
- Read the chunk (it should be layer information, a cel or a palette)

