home *** CD-ROM | disk | FTP | other *** search
/ Monster Media 1994 #1 / monster.zip / monster / GRAPHICS / RU04.ZIP / FORMATS.TXT < prev    next >
Text File  |  1994-02-10  |  2KB  |  51 lines

  1. THE 'RAW' FORMAT
  2.  
  3. The format is broken up into three main parts. The header, palette, and image
  4. portions.
  5.  
  6.                        ---  HEADER  ---
  7. Bytes
  8. -----
  9. 1 , 2 - Width of Image
  10. 3 , 4 - Height of Image
  11. 5 , 6 - Number of Colors - if 0 image does not contain a palette
  12.  
  13.                       ---  PALETTE  ---
  14.  
  15. 7 , 8 , 9  - Red, Green, Blue values of the first color. The values will range
  16.              from 0 to 63. Each additional three bytes indicate the values of
  17.              the next color. For an image that contains 16 colors the PALETTE
  18.              size will be 48 bytes (3*16).  
  19.  
  20.                         ---  IMAGE ---
  21.  
  22. What ever follows after the palette is the actual image. The first byte
  23. following the palette will be the first pixel starting from the left top corner.
  24. The remaining pixels follow row by row. Each pixel takes exactly one byte no
  25. matter how many colors there are in the image.
  26.  
  27.  
  28.  
  29. THE 'RES' FORMAT
  30.  
  31.  
  32. Bytes
  33. -----
  34. 1,2,3 - Identification field. Should spell RES in ascii
  35. 4,5   - Number of resource items in the file
  36.  
  37. The next 22 bytes contain the TYPE, ID, OFFSET, and SIZE of first resource
  38. item. If there is a second item the format continues with the next 22 bytes
  39. and so on.
  40.  
  41. 6,7   - TYPE
  42. 8-19  - ID
  43. 20-23 - OFFSET
  44. 24-27 - SIZE
  45.  
  46. The TYPE field indicates what kind of format it was converted to with the
  47. RastPort. The ID is a 12 letter/number put in the by the user to describe
  48. the resource item. The OFFSET indicates where in the resource file the item
  49. is located. The last field describes the size of the resource item.
  50.  
  51.