


IMBMP(3IM)             SDSC IMAGE LIBRARY              IMBMP(3IM)



NAME
     imbmp - Microsoft Windows BMP file translation

SYNOPSIS
     #include <stdio.h>
     #include "sdsc.h"
     #include "im.h"

     int ImFileRead( fd, "bmp", flagsTable, dataTable )
          int         fd;
          TagTable   *flagsTable;
          TagTable   *dataTable;

     int ImFileFRead( fp, "bmp", flagsTable, dataTable )
          FILE         *fp;
          TagTable   *flagsTable;
          TagTable   *dataTable;

     int ImFileWrite( fd, "bmp", flagsTable, dataTable )
          int         fd;
          TagTable   *flagsTable;
          TagTable   *dataTable;

     int ImFileFWrite( fp, "bmp", flagsTable, dataTable )
          FILE         *fp;
          TagTable   *flagsTable;
          TagTable   *dataTable;


DESCRIPTION
     bmp image files are generated by  programs  running  in  the
     Microsoft   Windows  3.0,  and  later,  environments.   This
     environment commonly runs on IBM PC's and compatibles.

     bmp files store color and B&W image bitmaps used  in  screen
     backgrounds  and  in  other image work.  See imico (3IM) and
     imcur (3IM) for discussion of the Microsoft Windows icon and
     cursor storage formats, respectively.

FILE RECOGNITION
     Microsoft Windows bmp files are recognized by the  following
     filename suffix:  .bmp.

NOTES
     SDSC image library support of the Microsoft Windows bmp for-
     mat  does  not require use of any Windows libraries and con-
     tains no proprietary code. Microsoft Windows bmp format han-
     dling  is  available on any machine for which the SDSC image
     library is available.

  Reading Microsoft Windows BMP files
     The SDSC image library reads  non-compressed,  pixel  packed



SDSC              Last change: August 19, 1992                  1






IMBMP(3IM)             SDSC IMAGE LIBRARY              IMBMP(3IM)



     1-,  4-,  and  8-bit color indexed images; RLE compressed 4-
     and 8-bit color indexed images;  and  non-compressed  24-bit
     RGB Microsoft Windows bmp images and stores them as IMVFBIN-
     DEX8 VFB with CLT's or IMVFBRGB VFB's, as appropriate.

  Writing Microsoft Windows BMP files
     Image library IMVFBMONO VFBs are written to  non-compressed,
     pixel  packed  1-bit  bmp  files.  Image library IMVFBINDEX8
     VFBs are written to  non-compressed,  pixel  packed  or  RLE
     compressed  4-  or  8-bit bmp files, with preference to non-
     compressed, pixel packed files.  Image library IMVFBRGB VFBs
     are written to non-compressed 24-bit RGB bmp files.

     Other image library VFB types are  converted  to  IMVFBMONO,
     IMVFBINDEX8,  or  IMVFBRGB VFB's prior to being written out.
     See the ImFileWrite(3IM) man page for details.

  Special Note
     The utilities supplied with the current version of  Windows,
     3.1,  do not support RLE compressed 4- or 8-bit images.  For
     this reason, the SDSC Image Tools default  to  writing  non-
     compressed  bmp  files.   This  default  can be overriden by
     specifying the -_o_u_t_c_o_m_p_r_e_s_s _r_l_e flag on imconv (1IM)  or  by
     setting  the the "image compress" tag in the _F_l_a_g_s_T_a_b_l_e when
     calling ImFileWrite (3IM).

ERRORS
     In addition to those listed for  ImFileRead(3IM),  Microsoft
     Windows bmp file reading returns the following error codes:

          IMEDEPTH   Image depth not supported
          IMEMAGIC   Bad magic number in header

DOCUMENTATION
     _M_i_c_r_o_s_o_f_t _W_i_n_d_o_w_s _P_r_o_g_r_a_m_m_e_r'_s _R_e_f_e_r_e_n_c_e _V_o_l_u_m_e_s  _3  _a_n_d  _4,
     Microsoft, Inc.

SEE ALSO
     ImIntro(3IM),   ImErrNo(3IM),    imconv(1IM),    imcur(3IM),
     imfile(1IM), imformats(1IM), imico(3IM)

AUTHOR
     Toan-Vinh Le
     San Diego Supercomputer Center

CONTACT
     SDSC consultants, (619)534-5100, consult@y1.sdsc.edu








2                 Last change: August 19, 1992               SDSC



