home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 3 Comm / 03-Comm.zip / haotd1_1.zip / HAVIEW2.HLP (.txt) < prev    next >
OS/2 Help File  |  1995-10-12  |  22KB  |  653 lines

  1.  
  2. ΓòÉΓòÉΓòÉ 1. Bitmap File dialog ΓòÉΓòÉΓòÉ
  3.  
  4. This dialog allows you to load a bitmap from a file, or save a bitmap to a 
  5. file. Filenames and directories may be selected from the listboxes via the 
  6. keyboard or the mouse, just like in any other File dialog. 
  7.  
  8. You can handle bitmap files of a variety of different formats. For example, 
  9. OS/2 Bitmaps, CompuServe GIF files, ZSoft PCX files and many others. 
  10.  
  11. To see an extensive list of the level of support for the various bitmap 
  12. formats, and the format specific options available in each, see the Bitmap file 
  13. format support section of this help. 
  14.  
  15. You can select which files are listed in the files listbox using the File type 
  16. combo box. You can pick, <All files>, <All GBM supported files> and various 
  17. <Format>s. 
  18.  
  19. The program will look at the file extension and determine the format of the 
  20. file and use the relevant bitmap file handling code. 
  21.  
  22. The Optional bitmap format specific options field allows you to specify a 
  23. string which is used to give hints to the relevant bitmap file handling code. 
  24. For example, you can tell the GIF file reader to ignore corrupt data and return 
  25. how far it got by giving the "errok" option. 
  26.  
  27.  
  28. ΓòÉΓòÉΓòÉ 2. Bitmap file format support ΓòÉΓòÉΓòÉ
  29.  
  30. This program uses the Generalised Bitmap Module. This peice of code can read 
  31. and write a variety of bitmap formats. The application program is unaware of 
  32. the file format of any bitmaps, and is just presented with the bitmap data in a 
  33. single standard way. 
  34.  
  35. Some bitmap formats allow additional options to be supplied and these options 
  36. are listed highlighted like this. 
  37.  
  38. This section fully defines the level of support :- 
  39.  
  40. Formats supported are : 
  41.  
  42.       OS/2 / Windows Bitmap 
  43.  
  44.       CompuServe Graphics Interchange Format 
  45.  
  46.       ZSoft PC Paintbrush Image Format 
  47.  
  48.       Microsoft/Aldus Tagged Image File Format 
  49.  
  50.       Truevision Targa/Vista 
  51.  
  52.       Amiga IFF / ILBM Interleaved bitmap format 
  53.  
  54.       YUV12C M-Motion Frame Buffer 
  55.  
  56.       Portable Greyscale-map 
  57.  
  58.       Portable Pixel-map 
  59.  
  60.       IBM KIPS 
  61.  
  62.       IBM Image Access eXecutive 
  63.  
  64.       X Windows bitmap 
  65.  
  66.       RiscOS Sprite 
  67.  
  68.       Others 
  69.  
  70.  The Bitmap File Dialog can handle bitmaps in any of the formats documented 
  71.  above. 
  72.  
  73.  
  74. ΓòÉΓòÉΓòÉ 2.1. OS/2 / Windows bitmap ΓòÉΓòÉΓòÉ
  75.  
  76. The following file extensions 
  77.  
  78.   .BMP .VGA .BGA .RLE .DIB .RL4 .RL8
  79.  
  80. are recognised as OS/2 1.1, 1.2, 2.0 or Windows 3.0 bitmaps. 
  81.  
  82. Input 
  83.  
  84. The bitmap support will read any of the above if uncompressed or run-length 
  85. compressed. 
  86.  
  87. CCITT G3 MH Fax compressed files, or RLE24 compressed files can't be read. 
  88.  
  89.  index=N 
  90.         Can be used if the file is an OS/2 bitmap-array file to specify which 
  91.         bitmap in the array to read (default N=0 - the first in the array). 
  92.  inv 
  93.         Causes the palette to get inverted after reading. Provided to allow for 
  94.         inconsistencies between Windows and OS/2 programs in how the palette of 
  95.         1bpp files should be interpreted. 
  96.  invb 
  97.         Causes the bitmap bits to get inverted after reading. 
  98.  
  99.  Output 
  100.  
  101.  The this module can write both OS/2 1.1 and OS/2 2.0 / Windows 3.0 style 
  102.  bitmaps. 
  103.  
  104.  By default OS/2 2.0 or Windows 3.0 bitmaps are written. This has changed since 
  105.  previous releases. 
  106.  
  107.  The OS/2 2.0 / Windows 3.0 style of bitmaps written are written with a header 
  108.  size (cbFix) of 40, which is compatible with both Windows 3.0 and OS/2 2.0. 
  109.  
  110.  1.1 
  111.         Causes the bitmap to be written OS/2 1.1 style. 
  112.  2.0 or win 
  113.         Causes the bitmap to be written OS/2 2.0 / Windows 3.0 style. 
  114.  inv 
  115.         Causes the palette to get inverted before written. Provided to allow 
  116.         for inconsistencies between Windows and OS/2 programs in how the 
  117.         palette of 1bpp files should be interpreted. 
  118.  invb 
  119.         Causes the bitmap bits to get inverted before written. 
  120.  
  121.  The newer MultiMedia Windows bitmap format that allows 16 and 32 bpp support 
  122.  is not currently supported. 
  123.  
  124.  The Bitmap file format support help panel lists other supported file formats. 
  125.  
  126.  
  127. ΓòÉΓòÉΓòÉ 2.2. CompuServe Graphics Interchange Format ΓòÉΓòÉΓòÉ
  128.  
  129. The .GIF file extension is recognised as a GIF file. 
  130.  
  131. Input 
  132.  
  133. 1 bpp GIF files are read as 1 bpp data. 
  134.  
  135. 2, 3 and 4 bit GIF files are read and returned as 4 bpp data. 
  136.  
  137. 5, 6, 7 and 8 bit GIF files are read and returned as 8 bpp data. 
  138.  
  139. GIF files provide no support for 24 bpp images. 
  140.  
  141. Both GIF87a and GIF89a level files may be read. 
  142.  
  143. The code will correctly handle deferred clear-codes in the LZW data stream. 
  144. Files with these often break earlier programs that claim to load GIF files. 
  145.  
  146.  index=N 
  147.         Can be used to specify which image in the GIF file to read (default 
  148.         N=0). 
  149.  errok 
  150.         If a corrupted or truncated GIF file is encountered, normally an error 
  151.         is returned. With this option, as much data as was decoded before the 
  152.         error is returned, and no error occurs. 
  153.  
  154.  Output 
  155.  
  156.  The GIF87a style of GIF files are written, and since the GIF standard is 
  157.  backwardly compatible, all programs that claim to load GIF files should handle 
  158.  the output generated by this program. 
  159.  
  160.  This program does not generate GIF files with deferred-clear-codes, as these 
  161.  have been shown to break many older GIF readers. 
  162.  
  163.  xscreen=N,yscreen=N 
  164.         Specifies what values to put in these fields of the GIF file header. 
  165.         The default is the image size. 
  166.  background=N 
  167.         Specifies what background color index to write in the GIF file header. 
  168.         The default is 0. 
  169.  xpos=N,ypos=N 
  170.         Specifies what values to put in these fields in the GIF file header. 
  171.         The defaults are 0 and 0. 
  172.  
  173.  This code correctly handles 1bpp GIF files. Some programs make incorrect 
  174.  assumptions about the initial LZW code table size in the 1bpp case, and so 
  175.  fall over. UBU is guilty of this. 
  176.  
  177.  This code has been tested on a selection of files from IBM internal ftp 
  178.  fileservers starbase1.austin.ibm.com and depeter.almaden.ibm.com, many 
  179.  Internet ftp fileservers, output of public domain PPMTOGIF.EXE, and tested for 
  180.  compatibility with UNIX X Windows xloadimage and xv. 
  181.  
  182.  The Bitmap file format support help panel lists other supported file formats. 
  183.  
  184.  GIF and 'Graphics Interchange Format' are trademarks (tm) of Compuserve, 
  185.  Incorporated, an H&R Block Company. 
  186.  
  187.  
  188. ΓòÉΓòÉΓòÉ 2.3. ZSoft PC Paintbrush Image Format ΓòÉΓòÉΓòÉ
  189.  
  190. The .PCX file extension is recognised as a Paintbrush file. 
  191.  
  192. Only a subset of the possible planes/bits-per-plane combinations are supported. 
  193.  
  194. Input 
  195.  
  196. This program reads 1,4,8 and 24 bpp files. 
  197.  
  198. The run-length encoding scheme is supported. 
  199.  
  200. Compressed runs of pixels are not supposed to straddle scan lines. Some other 
  201. applications violate this rule. By default, if this code finds that a run of 
  202. pixels is longer than the scan line, it will use the leftover pixels on the 
  203. next scan line. Some images will not load properly, as they require the loading 
  204. program to discard those pixels in the run that extend beyond the end of the 
  205. scan line. This behaviour can be enabled using the trunc option. 
  206.  
  207. Output 
  208.  
  209. This program writes 1,4,8 and 24 bpp files, using run-length compression. 
  210.  
  211. It will always ensure run-lengths of pixels do not straddle scan lines. 
  212.  
  213. This code has been tested on some PC Paintbrush originated .PCX files. 
  214.  
  215. The Bitmap file format support help panel lists other supported file formats. 
  216.  
  217.  
  218. ΓòÉΓòÉΓòÉ 2.4. Microsoft/Aldus Tagged Image File Format ΓòÉΓòÉΓòÉ
  219.  
  220. The .TIF file extension is recognised as a TIFF file. 
  221.  
  222. There is support to handle 1,4,8 and 24 bpp files. 
  223.  
  224. Input 
  225.  
  226. This program reads uncompressed, Packbits and LZW compressed files. 
  227.  
  228. This code will read all Baseline TIFF 6.0 files, except CCITT Modified Huffman 
  229. encoded bi-level files. 
  230.  
  231.  index=N 
  232.         Can be used if the file contains more than one image to specify which 
  233.         image to read (default N=0 - the first). 
  234.  
  235.  Output 
  236.  
  237.  This program writes uncompressed data only. 
  238.  
  239.  Data are written in a single large strip. 
  240.  
  241.  Files written by this code are Baseline TIFF 6.0 compliant. 
  242.  
  243.  artist=TEXT 
  244.         Causes an Artist tag to be added with text TEXT. 
  245.  software=TEXT 
  246.         Causes the Software tag to be added with text TEXT. The default 
  247.         Software tag to be added if none is specified is Generalised Bitmap 
  248.         Module. 
  249.  make=TEXT 
  250.         Causes the Make tag to be added with text TEXT. 
  251.  model=TEXT 
  252.         Causes the Model tag to be added with text TEXT. 
  253.  host=TEXT 
  254.         Causes the Host tag to be added with text TEXT. 
  255.  documentname=TEXT 
  256.         Causes the DocumentName tag to be added with text TEXT. 
  257.  pagename=TEXT 
  258.         Causes the PageName tag to be added with text TEXT. 
  259.  imagedescription=TEXT 
  260.         Causes the ImageDescription tag to be added with text TEXT. 
  261.  pal1bpp 
  262.         Causes 1 bpp data to be written as a palettised file, with 2 palette 
  263.         entries. Technically this is not TIFF 6.0 Baseline compliant. The 
  264.         default is to write out a bi-level file with the brightest color as 
  265.         white. This is Baseline compliant. 
  266.  
  267.  The TEXT should not include spaces. 
  268.  
  269.  There are 2 well known corruptions of the TIFF format. 
  270.  
  271.  Some TIFF writers write the ColorMap tags length to be 2^N, whereas it should 
  272.  be 3*2^N. This code will detect this tag having a bad length, and correct for 
  273.  it transparently. UBU is/was guilty of this. 
  274.  
  275.  Some TIFF readers/writers believe that ColorMap entrys are bytes. In fact they 
  276.  are words. When reading TIFF files, if this code finds that all the palette 
  277.  entrys are in the range 0-255, as opposed to 0-65535, then it multiplys them 
  278.  all by 256, thus transparently overcoming the problem. When writing TIFF 
  279.  files, this code writes the 8 bit palette entry in both the low and high bytes 
  280.  of the tag. Thus programs that look at the high byte work fine. Programs that 
  281.  use the full word work fine (the colors get 0.5% brighter). Programs that 
  282.  incorrectly look at the bottom byte work fine too. At least one version of IBM 
  283.  OS/2 Image Support is/was guilty of this. 
  284.  
  285.  JPEG compressed data, and data in the Y-Cb-Cr color space is not supported. 
  286.  
  287.  CCITT G3 Modified Huffman / Facsimile compressed data is not supported. 
  288.  
  289.  The Bitmap file format support help panel lists other supported file formats. 
  290.  
  291.  
  292. ΓòÉΓòÉΓòÉ 2.5. Truevision Targa/Vista bitmap ΓòÉΓòÉΓòÉ
  293.  
  294. The following file extensions 
  295.  
  296.   .TGA .VST .AFI
  297.  
  298. are recognised as Targa/Vista files. 
  299.  
  300. This handles the uncompressed Targa/Vista formats. 
  301.  
  302. This code only supports 8 bpp and 24 bpp images. 
  303.  
  304. Input 
  305.  
  306. This code will read files with both top-left-origin and bottom-left-origin. Not 
  307. all Targa readers correctly handle bottom-left-origin files. 
  308.  
  309. When reading 16 bpp files (which are 5 red + 5 green + 5 blue + 1 alpha), they 
  310. are loaded and presented as 24 bpp bitmaps with only the top 5 bits of each of 
  311. the 8 bit bytes valid. The bottom 3 bits are zero. 
  312.  
  313. When reading 32 bpp files (which are 8 red + 8 green + 8 blue + 8 alpha), the 
  314. alpha channel is ignored. 
  315.  
  316. Output 
  317.  
  318.  yup and ydown 
  319.         Causes the data to be written in bottom-left-origin or top-left-origin 
  320.         form. The default is bottom-left-origin. 
  321.  16 
  322.         If the data is 24 bpp, then the 16 flag causes only the most 
  323.         significant 5 bits of the red, green and blue to be written in a 16 bit 
  324.         pixel. 
  325.  24 
  326.         Has no effect, as this is the default. 
  327.  32 
  328.         If the data is 24 bpp, then the 32 flag causes the data to be padded 
  329.         with 8 zero bits of alpha channel to make a 32 bit pixel. 
  330.  
  331.  The Bitmap file format support help panel lists other supported file formats. 
  332.  
  333.  
  334. ΓòÉΓòÉΓòÉ 2.6. Amiga IFF / ILBM Interleaved bitmap format ΓòÉΓòÉΓòÉ
  335.  
  336. The following file extensions 
  337.  
  338.   .IFF .LBM
  339.  
  340. are recognised as interleaved bitmap files. 
  341.  
  342. Normally ILBM files are 1,2,3,4 or 5 bpp, because the early Amigas supported 
  343. upto 32 colors at once. 6,7 and 8 bpp files are also found nowadays too. 
  344.  
  345. Extra-HalfBrite, or EHB is a mode where N colors have palette entries, but the 
  346. file may contain 2*N colors. The second set of N colors are half the brightness 
  347. of the first half. In this way, for example, 64 colors may be displayed on an 
  348. early Amiga. 
  349.  
  350. Hold-And-Modify, or HAM is a type of screen format where each pixel is either 
  351. one of a small number of colors in a palette, or is held the same as the pixel 
  352. to its left except that either the red, green or blue is modified. In this way 
  353. a much larger range of colors can be displayed. 
  354.  
  355. HAM modes sometimes have fringes down the vertical edges of shapes in the 
  356. picture, as sometimes it is necessary to modify the lefthand pixel several 
  357. times to get to the desired color, if a suitable entry is not in the palette. 
  358.  
  359. HAM6 is a HAM mode where there are 16 base palette entries and a possible 
  360. maximum of 4096 colors. This is found on early Amigas. 
  361.  
  362. HAM8 is a HAM mode where there are 64 base palette entries and a full 24 bit 
  363. range of colors. Also because of the larger palette, fringing is less than in 
  364. HAM6. This mode is present on later Amigas. 
  365.  
  366. Sliced-Hold-And-Modify, or SHAM is a mode where the palette is changed on every 
  367. (or every other) scan line. This also helps reduce fringing compared to normal 
  368. HAM6. SHAM is actually sliced HAM6, and might really be called SHAM6, and SHAM8 
  369. is not known to exist. 
  370.  
  371. Input 
  372.  
  373. This code can read files that contain uncompressed or RLE compressed data. 
  374.  
  375. 1 bpp files can be read ok. 
  376.  
  377. 2,3 and 4 bpp files are read and returned as 4 bpp data. 
  378.  
  379. 5,6,7 and 8 bpp files are read and returned as 8 bpp data. 
  380.  
  381. EHB images can be read and are returned as 8 bpp data. 
  382.  
  383. HAM6, HAM8 and SHAM files can be read and are returned as 24 bpp data. 
  384.  
  385. Only the BMHD, CMAP, CAMG and BODY chunks are used when reading the file. 
  386.  
  387. Output 
  388.  
  389. This code can write 1, 4 and 8 bpp files. 
  390.  
  391. 24 bpp files can be written also, this code performs a mapping to HAM6 before 
  392. writing to the file. This loses quality, but, is still better than a normal 8 
  393. bpp file. 
  394.  
  395. This code writes RLE compressed data, as this usually results in much smaller 
  396. files. 
  397.  
  398. Only the BMHD, CMAP and BODY chunks are written to the file. When writing HAM 
  399. data, a CAMG chunk is written also. 
  400.  
  401. You can optionally override parts of the BMHD header. 
  402.  
  403.  xpos=N,ypos=N 
  404.         Overrides the origin information in the file. Defaults are 0,0. 
  405.  transcol=N 
  406.         Overrides the transparent color field. Default is 0. 
  407.  xaspect=N,yaspect=N 
  408.         Overrides the aspect ratio information. Defaults are 1,1. This header 
  409.         information is not always honored by ILBM readers. 
  410.  xscreen=N,yscreen=N 
  411.         Overrides the screen size information. This is not often used by ILBM 
  412.         readers. The default is the image size. 
  413.  
  414.  Note that when some early programs try to load an >5 bpp ILBM file, they can 
  415.  switch to a 32 color (5 bpp mode) and only read the 5 least significant planes 
  416.  of the file. This generally looks bad. 
  417.  
  418.  This support has been tested using a large range of sample files. But, some 
  419.  sample files supplied to the author have yet to be loaded. In particular some 
  420.  (24bpp?) DCTV originated files are not yet understood. 
  421.  
  422.  The Bitmap file format support help panel lists other supported file formats. 
  423.  
  424.  
  425. ΓòÉΓòÉΓòÉ 2.7. YUV12C M-Motion Frame Buffer ΓòÉΓòÉΓòÉ
  426.  
  427. The .VID file extension is recognised as a YUV12C file. 
  428.  
  429. Although YUV12C files contain 12 bit YUV encoded color image data, this code 
  430. pretends they contain 24 bit RGB encoded color data. 
  431.  
  432. Input 
  433.  
  434. The files are converted from YUV to RGB data before the data is presented to 
  435. the program. 
  436.  
  437. Output 
  438.  
  439. The RGB data is converted to YUV when it is written to disk. 
  440.  
  441. YUV12C files must be a multiple of 4 pixels wide. When trying to write a bitmap 
  442. that is not a multiple of 4 pixels wide, this code truncates the last 1, 2 or 3 
  443. pixels left over. 
  444.  
  445.  xpos=N,ypos=N 
  446.         Overrides the origin information in the file. Defaults are 0,0. 
  447.  
  448.  This support has been tested using the M-Control Program 2.0, Browser sample 
  449.  application. 
  450.  
  451.  The Bitmap file format support help panel lists other supported file formats. 
  452.  
  453.  
  454. ΓòÉΓòÉΓòÉ 2.8. Portable Greyscale-map ΓòÉΓòÉΓòÉ
  455.  
  456. The .PGM file extension is recognised as a Greymap file. 
  457.  
  458. Credit for file format to Jef Poskanzer. 
  459.  
  460. Only the Binary P5 form of this format is supported. 
  461.  
  462. These files hold no palette information. 
  463.  
  464. Input 
  465.  
  466. The files are returned as an 8 bit image usually with a greyscale palette. 
  467.  
  468.  r,g,b or k 
  469.         Forces the image to be read as shades of red, green, blue or grey (the 
  470.         default). 
  471.  
  472.  Output 
  473.  
  474.  Normally 8 bpp image data as the greyscale equivelent of the bitmap data. 
  475.  
  476.  r,g,b or k 
  477.         Forces the red,green or blue component of the image to be written, or 
  478.         alternatively to write the greyscale equivelent (the default). 
  479.  
  480.  The Bitmap file format support help panel lists other supported file formats. 
  481.  
  482.  
  483. ΓòÉΓòÉΓòÉ 2.9. Portable Pixel-map ΓòÉΓòÉΓòÉ
  484.  
  485. The .PPM file extension is recognised as a Pixel-map file. 
  486.  
  487. Credit for file format to Jef Poskanzer. 
  488.  
  489. Only the Binary P6 form of this format is supported. 
  490.  
  491. The Portable Pixel-map format is only capable of holding 24 bpp RGB data, and 
  492. this code fully supports this. 
  493.  
  494. The Bitmap file format support help panel lists other supported file formats. 
  495.  
  496.  
  497. ΓòÉΓòÉΓòÉ 2.10. IBM KIPS ΓòÉΓòÉΓòÉ
  498.  
  499. The .KPS file extension is recognised as a Pixel-map file. 
  500.  
  501. The .KPS file is not enough to define a KIPS image. 
  502.  
  503. The palette is stored in either an associated .PAL or .KPL file. 
  504.  
  505. Input 
  506.  
  507.  pal or kpl 
  508.         Tells this code to look for a .PAL or a .KPL file to find the palette 
  509.         (default is .PAL) 
  510.  
  511.  Output 
  512.  
  513.  pal or kpl 
  514.         Tells this code to write  a .PAL or a .KPL file containing the palette. 
  515.         (default is .PAL) 
  516.  
  517.  The Bitmap file format support help panel lists other supported file formats. 
  518.  
  519.  
  520. ΓòÉΓòÉΓòÉ 2.11. IBM Image Access eXecutive ΓòÉΓòÉΓòÉ
  521.  
  522. The .IAX file extension is recognised as a IAX file. 
  523.  
  524. This image format does not include a palette or a file header. In particular, 
  525. the image file size cannot be determined from the file! This code assumes an 
  526. image width of 512 pixels, and determines the image height by dividing the file 
  527. size by the width. 
  528.  
  529. The data is presented as a greyscale. 
  530.  
  531. Input 
  532.  
  533.  r,g,b or k 
  534.         Forces the image to be read as shades of red, green, blue or grey (the 
  535.         default). 
  536.  width=N 
  537.         Overrides the default assumption that the image width is 512 pixels. 
  538.  
  539.  Output 
  540.  
  541.  Normally 8 bpp image data as the greyscale equivelent of the bitmap data. 
  542.  
  543.  r,g,b or k 
  544.         Forces the red,green or blue component of the image to be written, or 
  545.         alternatively to write the greyscale equivelent (the default). 
  546.  
  547.  The Bitmap file format support help panel lists other supported file formats. 
  548.  
  549.  
  550. ΓòÉΓòÉΓòÉ 2.12. X Windows Bitmap ΓòÉΓòÉΓòÉ
  551.  
  552. The .XBM file extension is recognised as a X Bitmap file. 
  553.  
  554. X Bitmap files are ASCII text files, that look to be directly source 
  555. include-able in C programs. 
  556.  
  557. This program is very generous in its parsing of the files. 
  558.  
  559. This program supports X10 and X11 1bpp bitmaps. Some .XBM files with text 
  560. strings inside have been encountered. These looked to be sprites or icons and 
  561. are not supported. 
  562.  
  563. When reading X Bitmaps, 1's are returned as black, 0's as white. 
  564.  
  565. When writing X bitmaps, the darkest color is written as 1's, the lightest as 
  566. 0's. 
  567.  
  568. This code has been tested on some .XBM files obtained from IBM internal ftp 
  569. fileserver spock.hursley.ibm.com 
  570.  
  571. The Bitmap file format support help panel lists other supported file formats. 
  572.  
  573.  
  574. ΓòÉΓòÉΓòÉ 2.13. RiscOS Sprite ΓòÉΓòÉΓòÉ
  575.  
  576. The .SPR file extension is recognised as a RiscOS sprite file. Technically, due 
  577. to the way the RiscOS works, files don't have extensions. But for convenience, 
  578. I have arbitrarily said .SPR, to allow sprites to fit in with all the other 
  579. image formats. 
  580.  
  581. Input 
  582.  
  583. This code will read 1,2,4 and 8 bpp files. 2bpp files will be expanded to 4bpp 
  584. on reading. 
  585.  
  586. Sprite files can contain an image, or an image and a mask plane. This code will 
  587. ignore the mask plane. 
  588.  
  589. If no palette is present in the file, GBM will assume a default palette similar 
  590. to that used by the RiscOS Wimp. 
  591.  
  592. There is a limitation in that the first-bit field of the sprite header must be 
  593. a multiple of 8 (highly likely). 
  594.  
  595.  index=N 
  596.         Can be used if the file contains more than one sprite to specify which 
  597.         sprite in the file to read (default N=0 - the first in the file). 
  598.  
  599.  Output 
  600.  
  601.  This code will write 1,4 and 8bpp files. 
  602.  
  603.  A palette will be written into the file. 
  604.  
  605.  Only the image plane is written, ie: no mask plane. 
  606.  
  607.  When outputting 8bpp bitmaps, the usual wierd Archimedes palette is written 
  608.  and the bitmap data is mapped to this palette. This is because the Archimedes 
  609.  cannot support arbitrary 256 color palettes. The VIDC chip only has 16 palette 
  610.  registers, with 16 fixed overrides on (or shades of) each. 
  611.  
  612.  GBM writes 16 palette entries to the file. Sprite files can be found with 64 
  613.  palette entries (with 4 overrides on each). However, it is seen that these 64 
  614.  palette entries are actually just 16 entries with the 4 overrides on each. 
  615.  Hence this is equivelent to 16 entries with 16 overrides, except some of the 
  616.  overrides are explicitly stored in the file. 
  617.  
  618.  Tested reading 4bpp sprites with no palette. 
  619.  
  620.  Tested reading 8bpp sprites with no palette and with 64 entry palette. 
  621.  
  622.  Sprites generated by GBM have been loaded on RiscOS. Remember: Use SetType to 
  623.  change type of file from PC-file to Sprite, by SetType option of filer menu or 
  624.  "*SetType <filename> Sprite". 
  625.  
  626.  The Bitmap file format support help panel lists other supported file formats. 
  627.  
  628.  
  629. ΓòÉΓòÉΓòÉ 2.14. Others ΓòÉΓòÉΓòÉ
  630.  
  631. Support for all the bitmap file formats may be added at any time, without 
  632. application writers being aware of it. 
  633.  
  634. Any new formats will be listed in the dialog filetype combobox, although the 
  635. help may not (yet) have an entry for them. 
  636.  
  637. The Bitmap file format support help panel lists other supported file formats. 
  638.  
  639.  
  640. ΓòÉΓòÉΓòÉ 3. Bitmap File format Credits ΓòÉΓòÉΓòÉ
  641.  
  642. This code is the work of :- 
  643.  
  644.  
  645. {{{ Andy Key
  646.  
  647. Internet: ak@vnet.ibm.com
  648. IBM-VNET: AKEY AT HVTVM5
  649.  
  650. Electronic addresses valid at least until 31st December 1993. 
  651.  
  652. I would like to thank all the numerous people who have helped by providing 
  653. sample bitmap files and file specifications.