Daggerfall Mod:Image formats/RCI
RCI Files (*.RCI) each consist of a contiguous list of UncompressedPixelData structures, defined below. Each element of the list describes a single image. Since each image of an RCI File have the same dimensions, and since RCI Files store the image data in UncompressedPixelData format, reading the list of images is a trivial matter of reading x bytes at a time. x is derived by multiplying the image's Width by Height properties, listed below by filename. E.g., A 64x64 pixel image RCI File would imply each UncompressedPixelData structure to be exactly 4096 (64 × 64) bytes long, and the total file length would be an integer multiple of 4096.
Contents
UncompressedPixelData[edit]
PixelData is a variably-sized array of UInt8 values, each value being an index to a Colour element of the ColourList of a Palette File.
Decoding Uncompressed Image Data[edit]
The resultant image is defined as being Width wide and Height high. Since the data is uncompressed, then each byte read represents one pixel of image data. One merely matches byte n to Palette[n] to retrieve the colour for that pixel.
Example code:
System.Drawing.Color[] DecodeUncompressedImage( System.Byte[] dataRead, System.Drawing.Color[] palette ) { System.Drawing.Color[] output = new System.Drawing.Color[ this.Width * this.Height ]; System.Int32 k; for ( System.Int32 j = 0; j < Height; j++ ) { k = j * Width; for ( System.Int32 i = 0; i < Width; i++ ) { output[ k + i ] = palette[ dataRead[ k + i ] ]; } } return output; }
RCI File Image Dimensions[edit]
Since each RCI File implies images of a specific dimension, then reading each of the contained images
File Name | Width | Height | Pixel data length in bytes |
---|---|---|---|
BUTTONS.RCI | 32 | 16 | 512 |
CHLD00I0.RCI | 64 | 64 | 4096 |
MPOP.RCI | 17 | 17 | 289 |
NOTE.RCI | 49 | 9 | 441 |
SPOP.RCI | 22 | 22 | 44 |
TFAC00I0.RCI | 64 | 64 | 4096 |
FACES.CIF | 64 | 64 | 4096 |
BANK01I1.IMG | 9 | 80 | 720 |
BANK01I2.IMG | 9 | 80 | 720 |
TRAV0I03.IMG | 45 | 22 | 990 |
GRAD00I0.IMG | 43 | 40 | 1720 |
GRAD01I0.IMG | 43 | 40 | 1720 |
TALK03I0.IMG | 107 | 20 | 2140 |
ITEM01I0.IMG | 36 | 81 | 2916 |
MASK01I0.IMG | 40 | 80 | 3200 |
MASK04I0.IMG | 40 | 80 | 3200 |
TRAV01I0.IMG | 179 | 22 | 3938 |
TRAV01I1.IMG | 179 | 22 | 3938 |
TALK02I0.IMG | 107 | 40 | 4280 |
COMPASS.IMG | 322 | 14 | 4508 |
ICON00I0.IMG | 320 | 64 | 20480 |
BUTN01I0.IMG | 184 | 144 | 26496 |
AMAP00I0.IMG | 320 | 200 | 64000 |
BIOG00I0.IMG | 320 | 200 | 64000 |
BOOK00I0.IMG | 320 | 200 | 64000 |
CHAR00I0.IMG | 320 | 200 | 64000 |
CHAR01I0.IMG | 320 | 200 | 64000 |
CHAR02I0.IMG | 320 | 200 | 64000 |
CHAR03I0.IMG | 320 | 200 | 64000 |
CHAR04I0.IMG | 320 | 200 | 64000 |
CHAR05I0.IMG | 320 | 200 | 64000 |
CNFG00I0.IMG | 320 | 200 | 64000 |
CORT01I0.IMG | 320 | 200 | 64000 |
CUST00I0.IMG | 320 | 200 | 64000 |
DESERT.IMG | 320 | 200 | 64000 |
INFO00I0.IMG | 320 | 200 | 64000 |
INFO01I0.IMG | 320 | 200 | 64000 |
INVE00I0.IMG | 320 | 200 | 64000 |
INVE01I0.IMG | 320 | 200 | 64000 |
INVE02I0.IMG | 320 | 200 | 64000 |
INVE04I0.IMG | 320 | 200 | 64000 |
INVE05I0.IMG | 320 | 200 | 64000 |
INVE0FI0.IMG | 320 | 200 | 64000 |
ITEM00I0.IMG | 320 | 200 | 64000 |
LGBK00I0.IMG | 320 | 200 | 64000 |
LOAD00I0.IMG | 320 | 200 | 64000 |
MAP100I0.IMG | 320 | 200 | 64000 |
MASK00I0.IMG | 320 | 200 | 64000 |
MASK02I0.IMG | 320 | 200 | 64000 |
MASK05I0.IMG | 320 | 200 | 64000 |
MASK06I0.IMG | 320 | 200 | 64000 |
PICK01I0.IMG | 320 | 200 | 64000 |
SCRL04I0.IMG | 320 | 200 | 64000 |
SCRL05I0.IMG | 320 | 200 | 64000 |
SCRL07I0.IMG | 320 | 200 | 64000 |
SCRL08I0.IMG | 320 | 200 | 64000 |
SCRL09I0.IMG | 320 | 200 | 64000 |
SCRL10I0.IMG | 320 | 200 | 64000 |
SCRL11I0.IMG | 320 | 200 | 64000 |
SCRL12I0.IMG | 320 | 200 | 64000 |
SCRL13I0.IMG | 320 | 200 | 64000 |
SCRL14I0.IMG | 320 | 200 | 64000 |
TALK01I0.IMG | 320 | 200 | 64000 |
TAMRIEL.IMG | 320 | 200 | 64000 |
TAMRIEL2.IMG | 320 | 200 | 64000 |
TMAP00I0.IMG | 320 | 200 | 64000 |
TRAV0I00.IMG | 320 | 200 | 64000 |
TRAV0I01.IMG | 320 | 200 | 64000 |
DANK02I0.IMG | 320 | 215 | 68800 |
NITE02I0.IMG | 512 | 219 | 112128 |
NITE03I0.IMG | 512 | 219 | 112128 |
NITE00I0.IMG | 512 | 219 | 112128 |
NITE01I0.IMG | 512 | 219 | 112128 |
Palettized RCI Files[edit]
There is a set of files which extend the above format. Immediately following the images is a valid PalFile structure. Assumedly this palette is to be used when displaying the images.
File Name | Width | Height | Pixel data length in bytes |
---|---|---|---|
CHGN00I0.IMG | 320 | 200 | 64000 |
DIE_00I0.IMG | 320 | 200 | 64000 |
PICK02I0.IMG | 320 | 200 | 64000 |
PICK03I0.IMG | 320 | 200 | 64000 |
PRIS00I0.IMG | 320 | 200 | 64000 |
TITL00I0.IMG | 320 | 200 | 64000 |