struct BMPHeader
 {
   unsigned short ID;    // 'BM' for a Windows BitMaP
   unsigned int   FSize; // Size of file
   unsigned short Res1;  // Not used
   unsigned short Res2;  // Not used
   unsigned int   Image; // Offset of image into file

   unsigned int   stSize;       // число байт, занимаемых структурой BITMAPINFOHEADER
   unsigned int   Width;        // Width of image
   unsigned int   Height;       // Height of image
   unsigned short Num;          // число битовых плоскостей устройства
   unsigned short Bits;         // Number of bits per pixel
   unsigned int   Comp;         // Type of compression, 0 for uncompressed, 1,2 for RLE
   unsigned int   ISize;        // Size of image in bytes
   unsigned int   XRes;         // X dots per metre (not inches! for US, unbelievable!)
   unsigned int   YRes;         // Y dots per metre
   unsigned int   PSize;        // Palette size (number of colours) if not zero
   unsigned int   PImportant;   // Probably reserved, currently 0
 };

typedef struct SPallete {       // Тип описывающий элемент палитры.
    char b,g,r,x;
} TPallete;

void BMP_PutFromFile(TMode cm, int x, int y, char * fname);

