CRT is a simple uncompressed bitmap image file format used in Carnivores: Dinosaur Hunter and Carnivores: Ice Age; files may also use the extensions CRTLM or CRTHD.
Format[]
// header (5 bytes)
0x0000
uint16
2
image width in pixels
0x0002
uint16
2
image height in pixels
0x0004
uint8
1
pixel bit depth; always
0x18
(24) or 0x20
(32)0x0005
byte
width * height * (depth / 8)
pixel data in RGB(A)888(8) format
24-bit pixels use RGB888 while 32-bit pixels use RGBA8888.
Because of the very simple format, it's trivial to calculate filesize in bytes to confirm a file is valid: width * height * (depth / 8) + 5
. For example, a 1024x1024 32-bit image should have a filesize of 4,194,309 bytes.
|
|