AXI format

AXI is Axis' native image format. It's an open format, which conforms to Axis' binary hierarchical serialization standard.

Generally, an AXI file contains an image, which can be decoded by Axis.
AXI can hold multiple images, each with different dimensions and pixel format, if required. This allows for animation with multiple frames or for storing an image in multiple pixel formats suitable for display on different devices.
It can also store images in tree dimensions, which is suitable for volumetric textures.

Serialization

The AXI data is serialized and deserialized by the AxNativeImage class.

  • An AXI starts with its main wrapping chunk with an ID value of 0x4d495841, which is "AXIM" in ASCII. This is why all AXI files begin with that sequence.
    • A size chunk with ID of 0x00014d49 contains three 32-bit values for width, height and depth respectively.
    • A format chunk with ID of 0x00024d49 contains a pixel format. For details, see the SerializePixelFormat() and DeserializePixelFormat() methods of the AxSerializationUtils class
    • An encoding chunk with ID of 0x00034d49 contains a 32-bit value which denotes the method of encoding the pixel data. If no such chunk is encountered, raw encoding is assumed as default.
    • A data chunk with ID of 0x00004d49 contains the actual pixel data

Customization

Because of the chunked hierarchical structure of the AXI format, it allows for custom data to be injected on serialization and then retrieved back at deserialization, by customizing the Save() and Load() methods of the AxNativeImage class

If done properly, that is, to have the custom data in its own chunks with unique IDs, the produced AXI format will be perfectly valid and readable to any Axis-driven application.