Subject: Targa File Header

From: [email-masked] (Jonathan Ort)
Date: 11 Mar 1994 20:45:33 GMT

// Targa file BASE header structure  (Type 1)
    struct TgaHeader_type {
        BYTE idlen;     // Length of I.D. Field
        BYTE maptype;   // Color map type
        BYTE ttype;     // Targa file type
        WORD cmapor;    // junk
        WORD maplen;    // Color map size
        BYTE mapsize;   // # of bits in each color map entry
        WORD llx;       // Lower left x co-ord
        WORD lly;       // Lower left y co-ord
        WORD Wd;     // Width of image
        WORD Ht;    // Height of image
        BYTE pixsize;   // # of bits per pixel
        BYTE flags;     // Image flags
    } TgaHeader;

BYTE is unsigned 8 bits
WORD is unsigned 16 bits

I think a structure for your images would look like:

0
0
2
0
0
0
0
320
200
24
0