Documentation
Docs/en/reference/image-format/formats.md
Image Source Formats
Generated reference. Do not edit directly. Update
BuildTools/ImageFormatInterface.json, then runpython BuildTools/docs_image_format.py --write.
| Index | Formats | FOFRM | Options | Baking | Runtime | Validation | Canonical JSON | Guide |
| Stable ID | Extension | Availability | Import contract | Source |
|---|---|---|---|---|
image-format.format.fofrm |
fofrm |
baker and default runtime | FOFRM composes relative image references into one static image, animation, or complete direction sheet and is the preferred authored wrapper for multi-frame or option-bearing sources. | Source/Tools/ImageBaker-Fofrm.cpp, Source/Tools/ImageRecipe.cpp |
image-format.format.frm |
frm |
baker and default runtime; importer requires FO_IMAGE_FRM=ON | FRM imports big-endian frame timing, offsets, deltas, one or complete direction tables, optional same-basename .pal data, and animated default-palette indices. | Source/Tools/ImageBaker-Frm.cpp, Source/Tools/ImageBaker-Frm.h |
image-format.format.fr0 |
fr0 |
baker and default runtime; importer requires FO_IMAGE_FRM=ON | A .fr0 entry discovers its numbered directional siblings, rejects a gap after direction loading begins, and renames baked output to lowercase .fofrm for critter paths or .frm otherwise. | Source/Tools/ImageBaker-Frm.cpp, Source/Tools/ImageBaker-Frm.h |
image-format.format.rix |
rix |
baker and default runtime; importer requires FO_IMAGE_RIX=ON | RIX imports one opaque indexed image using its embedded palette and emits one RGBA frame. | Source/Tools/ImageBaker-Rix.cpp, Source/Tools/ImageBaker-Rix.h |
image-format.format.art |
art |
baker and default runtime; importer requires FO_IMAGE_ART=ON | ART uses a 132-byte header with bit depth 8. Flag 0x1 stores one rotation, otherwise eight. All rotation-major tables precede pixel streams; raw frames contain width*height bytes and RLE is bounded by declared frame size. Reject truncated/underfilled/overflowing streams, negative dimensions and baked range overflow. Align selected frame hot spots on one transparent canvas per direction; sequence offsets locate the hot spot and Motion retain movement. Square directions map rotations 1,2,3,4,5,6,7,0; hex maps 1,2,3,5,6,7. art/critter/, art/monster/ and art/unique_npc/ mirror rotations 1–3 from 7–5. Walls/portals shift anchors (-40,+20) for 0,1,6,7; horizontal roof mirrors use the left edge. Present palette fallback, options and category-specific placement follow the imported ART contract. Whole duration fits uint32 milliseconds; zero clock normalizes to 10 fps and positive sub-ms periods to 1 ms. DeltaX/DeltaY remain signed32 during import; only serialized Motion narrows to int16, so FOFRM Motion/FrameMotions can replace wide imported deltas. | Source/Tools/ImageBaker-Art.cpp, Source/Tools/ImageBaker-Art.h |
image-format.format.spr |
spr |
baker only by default; wrap through FOFRM for the stock runtime; importer requires FO_IMAGE_SPR=ON | SPR imports named sequences, layered parts, direction remapping, color offsets, repeated-frame sharing, and fixed 10 fps, but the stock DefaultSpriteFactory does not register the .spr extension. BBox/center-derived coordinates are independent frame Offset, including repeated/shared slots; imported Motion is zero. | Source/Tools/ImageBaker-Spr.cpp, Source/Client/DefaultSprites.h, Source/Tools/ImageBaker-Spr.h |
image-format.format.zar |
zar |
baker and default runtime; importer requires FO_IMAGE_ZAR=ON | ZAR imports one palette-backed raw or RLE image with alpha into one RGBA frame. | Source/Tools/ImageBaker-Zar.cpp, Source/Tools/ImageBaker-ZarDecoder.cpp, Source/Tools/ImageBaker-Zar.h |
image-format.format.til |
til |
baker and default runtime; importer requires FO_IMAGE_TIL=ON | TIL imports its nested ZAR frames as a 10 fps single-direction sequence. | Source/Tools/ImageBaker-Til.cpp, Source/Tools/ImageBaker-Til.h |
image-format.format.mos |
mos |
baker and default runtime; importer requires FO_IMAGE_MOS=ON | MOS imports one tiled palette image; MOSC is decompressed first, and palette color 0x00FF00 is made transparent. | Source/Tools/ImageBaker-Mos.cpp, Source/Tools/ImageBaker-Mos.h |
image-format.format.bam |
bam |
baker and default runtime; importer requires FO_IMAGE_BAM=ON | BAM imports one selected cycle or one selected frame, supports packed BAMC input and RLE, reads signed16 centers into independent frame Offset with zero Motion, and treats palette blue 255 as transparent. | Source/Tools/ImageBaker-Bam.cpp, Source/Tools/ImageBaker-Bam.h |
image-format.format.png |
png |
baker and default runtime | PNG is decoded through libpng, strips 16-bit channels to 8-bit, expands palette/low-bit grayscale/tRNS data, and fills missing alpha with 255 before emitting one RGBA frame. | Source/Tools/ImageBaker-Png.cpp |
image-format.format.tga |
tga |
baker and default runtime | TGA supports only raw type 2 or RLE type 10 TrueColor input at 24 or 32 bpp, converts BGR(A) to RGBA, and flips rows bottom-to-top. | Source/Tools/ImageBaker-Tga.cpp |