home *** CD-ROM | disk | FTP | other *** search
/ Power-Programmierung / CD2.mdf / c / library / dos / grafik / vifs / sbif.h < prev    next >
Encoding:
C/C++ Source or Header  |  1989-07-26  |  730 b   |  27 lines

  1. /*
  2.  *    sbif.h  --  simple binary image format.
  3.  *
  4.  *
  5.  *    24 jul 1989  Olle Olsson.
  6.  */
  7.  
  8. /* size of the header */
  9. #define SBHSIZE  128
  10.  
  11. /*
  12.  * The header is plain ascii and contains (white-space separated):
  13.  * file name, x pixel count, y pixel count ....
  14.  */
  15.  
  16. /* the number of bytes required to hold one pixel line */
  17. #define XBYTES( xpixels )    ((xpixels) / 8 + ((xpixels) % 8 != 0))
  18.  
  19. /*
  20.  * The data is a two dimensional matrix of (one-bit) pixels.
  21.  * X is the fastest changing index.
  22.  * The first bit is the msb of the first byte (as EGA, Hercules, ...).
  23.  * The x lines of data are padded (if necessary) to full bytes.
  24.  * The number of x lines is the y pixel count.
  25.  * The y coordinate is upside down, i.e. the top line is first.
  26.  */
  27.