Skip to content

PIC Files (*.PIC)

Image files used for UI artwork, world/city presentation, map tiles, and character portraits. All .PIC files live in the PICS\ subdirectory.

Extension
*.PIC
Location
PICS\
Byte order
Little-endian (16-bit)
Size
Variable — chunk sequence with no global file header
Compression
Custom: RLE + Darklands-specific encoder
Magic
None
Status
Partial
Source
Quadko — PicFileFormat.txt; working C++ decoder: PicReaderC.cpp

Source: Quadko’s PicFileFormat.txt (no XML spec exists for this format)

Structure

A PIC file is a sequence of chunk blocks with no global file header.

Chunk Block

OffsetSizeFieldDescription
+0x002identifier2-byte chunk type code
+0x022lengthLength of the following data in bytes
+0x04lengthdataChunk-specific content

Chunk Types

IDNameDescription
M0Palette chunkOptional; defines palette entries for this image
X0Image data chunkRequired; contains compressed pixel data
X1Alt image dataAlternate image data variant

The common pattern is: optional M0 then required X0.

Chunk Formats

M0 — Palette Chunk

OffsetSizeFieldDescription
+0x001first_indexFirst palette index covered
+0x011last_indexLast palette index covered
+0x02variesRGB tripletsOne 3-byte entry per covered index

Typically covers indices 0x10–0xFF, leaving the base 16-color VGA range untouched. Color components are 0x00–0x3F (×4 for standard RGB).

X0 — Image Data Chunk

OffsetSizeFieldDescription
+0x002image_widthWidth in pixels
+0x022image_heightHeight in pixels
+0x041format_identifierCompression format indicator
+0x05variescompressed_bitstreamVGA 1-byte pixels with RLE + custom compression layer

Image data is VGA mode (1 byte = 1 palette index pixel), with RLE and an additional Darklands-specific compression layer on top.

Confidence

Medium-high. Documented by Quadko; a working C++ decoder exists (PicReaderC.cpp).