home *** CD-ROM | disk | FTP | other *** search
/ Unix System Administration Handbook 1997 October / usah_oct97.iso / rfc / 700s / rfc797.txt < prev    next >
Text File  |  1992-10-14  |  3KB  |  117 lines

  1.  
  2.  
  3. Network Working Group                                            A. Katz
  4. Request for Comments: 797                                            ISI
  5.                                                           September 1981
  6.  
  7.  
  8.                         FORMAT FOR BITMAP FILES
  9.  
  10.    This note describes a proposed format for storing simple bitmaps (one
  11.    bit per pixel)  in a file.   These  files  may be very  large and the
  12.    intent  is to use this format for short term storage and passing data
  13.    between  closely  coupled  programs.   The data in the file should be
  14.    stored in 8-bit bytes (octets).  Bitmaps may be any size.
  15.  
  16.    The first  4 octets  of the file  gives  the width  of each  line  (x
  17.    direction),  and the next 4 octets should give the number of lines of
  18.    the display  (length, y direction). After this is one octet for the x
  19.    increment  and one octet for the y  increment.   Following  these  10
  20.    octets  is the bitmap  itself.     The length  and width  fields  are
  21.    stored most significant octet first.
  22.  
  23.    The x and y increment  octets  tell how much space is between pixels.
  24.    For an ordinary display, both these would be one.
  25.  
  26.    Each line of the display  should  be scanned  from left to right. The
  27.    lines should start at the top and work down.  Each line in the bitmap
  28.    should  end on an octet boundary.  If the width of the display is not
  29.    divisable  by 8,  the rest of the last octet  should  be filled  with
  30.    zeros on the right.
  31.  
  32.    Below  is a representation  of a bitmap  file  (each  square  is  one
  33.    octet):
  34.  
  35.       ----------------------------------------------------------
  36.       |    1     |    2     |    3     |     4     |     5     |
  37.       |  width   |  width   |  width   |   width   |  length   |
  38.       ----------------------------------------------------------
  39.  
  40.       ----------------------------------------------------------
  41.       |     6    |     7    |     8    |     9     |     10    |
  42.       |  length  |  length  |  length  |x-increment|y-increment|
  43.       ----------------------------------------------------------
  44.  
  45.       ----------------------------------------------------------
  46.       |   11     |   12     |   13     |    14     |   15
  47.       |  data    |  data    |  data    |   data    |  data...
  48.       ----------------------------------------------------------
  49.  
  50.    For example,  bitmaps  from the RAPICOM  450 can be in  Fine  Detail,
  51.    Quality,  or Express  Mode.   In Fine Detail mode the x-increment and
  52.    y-increment  would be 1, for Quality mode, the x-increment would be 1
  53.    and the y-increment would be 2, and for Express mode, the x-increment
  54.  
  55.  
  56.  
  57. Alan R. Katz                                                    [page 1]
  58.  
  59.  
  60.                                                                         
  61.    would  be 1 and the y-increment  would be 3.  For these bitmaps it is
  62.    intended  that each scan line be repeated y-increment times when they
  63.    are displayed.
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70.  
  71.  
  72.  
  73.  
  74.  
  75.  
  76.  
  77.  
  78.  
  79.  
  80.  
  81.  
  82.  
  83.  
  84.  
  85.  
  86.  
  87.  
  88.  
  89.  
  90.  
  91.  
  92.  
  93.  
  94.  
  95.  
  96.  
  97.  
  98.  
  99.  
  100.  
  101.  
  102.  
  103.  
  104.  
  105.  
  106.  
  107.  
  108.  
  109.  
  110.  
  111.  
  112.  
  113.  
  114.  
  115. [page 2]                                                    Alan R. Katz
  116.  
  117.