home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / gbmv2.zip / GBMDLG.HLP (.txt) < prev    next >
OS/2 Help File  |  1994-03-23  |  23KB  |  707 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. IBM Printer Page Segment 
  69.  
  70. Others 
  71.  
  72. The Bitmap File Dialog can handle bitmaps in any of the formats documented 
  73. above. 
  74.  
  75.  
  76. ΓòÉΓòÉΓòÉ 2.1. OS/2 / Windows bitmap ΓòÉΓòÉΓòÉ
  77.  
  78. The following file extensions 
  79.  
  80.   .BMP .VGA .BGA .RLE .DIB .RL4 .RL8
  81.  
  82. are recognised as OS/2 1.1, 1.2, 2.0 or Windows 3.0 bitmaps. 
  83.  
  84. Input 
  85.  
  86. The bitmap support will read any of the above if uncompressed or run-length 
  87. compressed. 
  88.  
  89. CCITT G3 MH Fax compressed files, or RLE24 compressed files can't be read. 
  90.  
  91. index=N 
  92.        Can be used if the file is an OS/2 bitmap-array file to specify which 
  93.        bitmap in the array to read (default N=0 - the first in the array). 
  94. inv 
  95.        Causes the palette to get inverted after reading. Provided to allow for 
  96.        inconsistencies between Windows and OS/2 programs in how the palette of 
  97.        1bpp files should be interpreted. 
  98. invb 
  99.        Causes the bitmap bits to get inverted after reading. 
  100.  
  101. Output 
  102.  
  103. The this module can write both OS/2 1.1 and OS/2 2.0 / Windows 3.0 style 
  104. bitmaps. 
  105.  
  106. By default OS/2 2.0 or Windows 3.0 bitmaps are written. 
  107.  
  108. The OS/2 2.0 / Windows 3.0 style of bitmaps written are written with a header 
  109. size (cbFix) of 40, which is compatible with both Windows 3.0 and OS/2 2.0. 
  110.  
  111. 1.1 
  112.        Causes the bitmap to be written OS/2 1.1 style. 
  113. 2.0 or win 
  114.        Causes the bitmap to be written OS/2 2.0 / Windows 3.0 style. 
  115. inv 
  116.        Causes the palette to get inverted before written. Provided to allow for 
  117.        inconsistencies between Windows and OS/2 programs in how the palette of 
  118.        1bpp files should be interpreted. 
  119. invb 
  120.        Causes the bitmap bits to get inverted before written. 
  121.  
  122. The newer MultiMedia Windows bitmap format that allows 16 and 32 bpp support is 
  123. not currently supported. 
  124.  
  125. The Bitmap file format support help panel lists other supported file formats. 
  126.  
  127.  
  128. ΓòÉΓòÉΓòÉ 2.2. CompuServe Graphics Interchange Format ΓòÉΓòÉΓòÉ
  129.  
  130. The .GIF file extension is recognised as a GIF file. 
  131.  
  132. Input 
  133.  
  134. 1 bpp GIF files are read as 1 bpp data. 
  135.  
  136. 2, 3 and 4 bit GIF files are read and returned as 4 bpp data. 
  137.  
  138. 5, 6, 7 and 8 bit GIF files are read and returned as 8 bpp data. 
  139.  
  140. GIF files provide no support for 24 bpp images. 
  141.  
  142. Both GIF87a and GIF89a level files may be read. 
  143.  
  144. The code will correctly handle deferred clear-codes in the LZW data stream. 
  145. Files with these often break earlier programs that claim to load GIF files. 
  146.  
  147. index=N 
  148.        Can be used to specify which image in the GIF file to read (default 
  149.        N=0). 
  150. errok 
  151.        If a corrupted or truncated GIF file is encountered, normally an error 
  152.        is returned. With this option, as much data as was decoded before the 
  153.        error is returned, and no error occurs. 
  154.  
  155. Output 
  156.  
  157. The GIF87a style of GIF files are written, and since the GIF standard is 
  158. backwardly compatible, all programs that claim to load GIF files should handle 
  159. the output generated by this program. 
  160.  
  161. This program does not generate GIF files with deferred-clear-codes, as these 
  162. have been shown to break many older GIF readers. 
  163.  
  164. xscreen=N,yscreen=N 
  165.        Specifies what values to put in these fields of the GIF file header. The 
  166.        default is the image size. 
  167. background=N 
  168.        Specifies what background colour index to write in the GIF file header. 
  169.        The default is 0. 
  170. xpos=N,ypos=N 
  171.        Specifies what values to put in these fields in the GIF file header. The 
  172.        defaults are 0 and 0. 
  173.  
  174. This code correctly handles 1bpp GIF files. Some programs make incorrect 
  175. assumptions about the initial LZW code table size in the 1bpp case, and so fall 
  176. over. UBU is guilty of this. 
  177.  
  178. This code has been tested on a wide selection of files from a wide variety of 
  179. sources. It has been tested against the output of public domain PPMTOGIF.EXE, 
  180. and tested for 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 usually writes uncompressed data. 
  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. lzw 
  246.        Asks GBM to use LZW compression. 
  247. software=TEXT 
  248.        Causes the Software tag to be added with text TEXT. The default Software 
  249.        tag to be added if none is specified is Generalised Bitmap Module. 
  250. make=TEXT 
  251.        Causes the Make tag to be added with text TEXT. 
  252. model=TEXT 
  253.        Causes the Model tag to be added with text TEXT. 
  254. host=TEXT 
  255.        Causes the Host tag to be added with text TEXT. 
  256. documentname=TEXT 
  257.        Causes the DocumentName tag to be added with text TEXT. 
  258. pagename=TEXT 
  259.        Causes the PageName tag to be added with text TEXT. 
  260. imagedescription=TEXT 
  261.        Causes the ImageDescription tag to be added with text TEXT. 
  262. pal1bpp 
  263.        Causes 1 bpp data to be written as a palettised file, with 2 palette 
  264.        entries. Technically this is not TIFF 6.0 Baseline compliant. The 
  265.        default is to write out a bi-level file with the brightest colour as 
  266.        white. This is Baseline compliant. 
  267.  
  268. The TEXT should not include spaces. 
  269.  
  270. There are 2 well known corruptions of the TIFF format. 
  271.  
  272. Some TIFF writers write the ColorMap tags length to be 2^N, whereas it should 
  273. be 3*2^N. This code will detect this tag having a bad length, and correct for 
  274. it transparently. UBU is/was guilty of this. 
  275.  
  276. Some TIFF readers/writers believe that ColorMap entrys are bytes. In fact they 
  277. are words. When reading TIFF files, if this code finds that all the palette 
  278. entrys are in the range 0-255, as opposed to 0-65535, then it multiplys them 
  279. all by 256, thus transparently overcoming the problem. When writing TIFF files, 
  280. this code writes the 8 bit palette entry in both the low and high bytes of the 
  281. tag. Thus programs that look at the high byte work fine. Programs that use the 
  282. full word work fine (the colours get 0.5% brighter). Programs that incorrectly 
  283. look at the bottom byte work fine too. At least one version of Image Support 
  284. is/was guilty of this. 
  285.  
  286. JPEG compressed data, and data in the Y-Cb-Cr colour space is not supported. 
  287.  
  288. CCITT G3 Modified Huffman / Facsimile compressed data is not supported. 
  289.  
  290. The Bitmap file format support help panel lists other supported file formats. 
  291.  
  292.  
  293. ΓòÉΓòÉΓòÉ 2.5. Truevision Targa/Vista bitmap ΓòÉΓòÉΓòÉ
  294.  
  295. The following file extensions 
  296.  
  297.   .TGA .VST .AFI
  298.  
  299. are recognised as Targa/Vista files. 
  300.  
  301. This handles the uncompressed Targa/Vista formats. 
  302.  
  303. This code only supports 8 bpp and 24 bpp images. 
  304.  
  305. Input 
  306.  
  307. This code will read files with both top-left-origin and bottom-left-origin. Not 
  308. all Targa readers correctly handle bottom-left-origin files. 
  309.  
  310. When reading 16 bpp files (which are 5 red + 5 green + 5 blue + 1 alpha), they 
  311. are loaded and presented as 24 bpp bitmaps with only the top 5 bits of each of 
  312. the 8 bit bytes valid. The bottom 3 bits are zero. 
  313.  
  314. When reading 32 bpp files (which are 8 red + 8 green + 8 blue + 8 alpha), the 
  315. alpha channel is ignored. 
  316.  
  317. Output 
  318.  
  319. yup and ydown 
  320.        Causes the data to be written in bottom-left-origin or top-left-origin 
  321.        form. The default is bottom-left-origin. 
  322. 16 
  323.        If the data is 24 bpp, then the 16 flag causes only the most significant 
  324.        5 bits of the red, green and blue to be written in a 16 bit 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 colours at once. 6,7 and 8 bpp files are also found nowadays too. 
  344.  
  345. Extra-HalfBrite, or EHB is a mode where N colours have palette entries, but the 
  346. file may contain 2*N colours. The second set of N colours are half the 
  347. brightness of the first half. In this way, for example, 64 colours may be 
  348. displayed on an 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 colours 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 colours 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 colour, 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 colours. 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 colours. 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 colour 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 colour (5 bpp mode) and only read the 5 least significant planes 
  416. of the file. This generally looks bad. 
  417.  
  418. Some GBM created IFF files have been found to be loadable by AMOS programs 
  419. although not by Deluxe Paint. Apparently Deluxe Paint will crash if the image 
  420. size does not match one of the Amigas graphics modes, such as 320x256. 
  421.  
  422. This support has been tested using a large range of sample files. But, some 
  423. sample files supplied to the author have yet to be loaded. In particular some 
  424. (24bpp?) DCTV originated files are not yet understood. 
  425.  
  426. The Bitmap file format support help panel lists other supported file formats. 
  427.  
  428.  
  429. ΓòÉΓòÉΓòÉ 2.7. YUV12C M-Motion Frame Buffer ΓòÉΓòÉΓòÉ
  430.  
  431. The .VID file extension is recognised as a YUV12C file. 
  432.  
  433. Although YUV12C files contain 12 bit YUV encoded colour image data, this code 
  434. pretends they contain 24 bit RGB encoded colour data. 
  435.  
  436. Input 
  437.  
  438. The files are converted from YUV to RGB data before the data is presented to 
  439. the program. 
  440.  
  441. Output 
  442.  
  443. The RGB data is converted to YUV when it is written to disk. 
  444.  
  445. YUV12C files must be a multiple of 4 pixels wide. When trying to write a bitmap 
  446. that is not a multiple of 4 pixels wide, this code truncates the last 1, 2 or 3 
  447. pixels left over. 
  448.  
  449. xpos=N,ypos=N 
  450.        Overrides the origin information in the file. Defaults are 0,0. 
  451.  
  452. This support has been tested using the M-Control Program 2.0, Browser sample 
  453. application. 
  454.  
  455. The Bitmap file format support help panel lists other supported file formats. 
  456.  
  457.  
  458. ΓòÉΓòÉΓòÉ 2.8. Portable Greyscale-map ΓòÉΓòÉΓòÉ
  459.  
  460. The .PGM file extension is recognised as a Greymap file. 
  461.  
  462. Credit for file format to Jef Poskanzer. 
  463.  
  464. Only the Binary P5 form of this format is supported. 
  465.  
  466. These files hold no palette information. 
  467.  
  468. Input 
  469.  
  470. The files are returned as an 8 bit image usually with a greyscale palette. 
  471.  
  472. r,g,b or k 
  473.        Forces the image to be read as shades of red, green, blue or grey (the 
  474.        default). 
  475.  
  476. Output 
  477.  
  478. Normally 8 bpp image data as the greyscale equivelent of the bitmap data. 
  479.  
  480. r,g,b or k 
  481.        Forces the red,green or blue component of the image to be written, or 
  482.        alternatively to write the greyscale equivelent (the default). 
  483.  
  484. The Bitmap file format support help panel lists other supported file formats. 
  485.  
  486.  
  487. ΓòÉΓòÉΓòÉ 2.9. Portable Pixel-map ΓòÉΓòÉΓòÉ
  488.  
  489. The .PPM file extension is recognised as a Pixel-map file. 
  490.  
  491. Credit for file format to Jef Poskanzer. 
  492.  
  493. Only the Binary P6 form of this format is supported. 
  494.  
  495. The Portable Pixel-map format is only capable of holding 24 bpp RGB data, and 
  496. this code fully supports this. 
  497.  
  498. The Bitmap file format support help panel lists other supported file formats. 
  499.  
  500.  
  501. ΓòÉΓòÉΓòÉ 2.10. IBM KIPS ΓòÉΓòÉΓòÉ
  502.  
  503. The .KPS file extension is recognised as a Pixel-map file. 
  504.  
  505. The .KPS file is not enough to define a KIPS image. 
  506.  
  507. The palette is stored in either an associated .PAL or .KPL file. 
  508.  
  509. Input 
  510.  
  511. pal or kpl 
  512.        Tells this code to look for a .PAL or a .KPL file to find the palette 
  513.        (default is .PAL) 
  514.  
  515. Output 
  516.  
  517. pal or kpl 
  518.        Tells this code to write  a .PAL or a .KPL file containing the palette. 
  519.        (default is .PAL) 
  520.  
  521. The Bitmap file format support help panel lists other supported file formats. 
  522.  
  523.  
  524. ΓòÉΓòÉΓòÉ 2.11. IBM Image Access eXecutive ΓòÉΓòÉΓòÉ
  525.  
  526. The .IAX file extension is recognised as a IAX file. 
  527.  
  528. This image format does not include a palette or a file header. In particular, 
  529. the image file size cannot be determined from the file! This code assumes an 
  530. image width of 512 pixels, and determines the image height by dividing the file 
  531. size by the width. 
  532.  
  533. The data is presented as a greyscale. 
  534.  
  535. Input 
  536.  
  537. r,g,b or k 
  538.        Forces the image to be read as shades of red, green, blue or grey (the 
  539.        default). 
  540. width=N 
  541.        Overrides the default assumption that the image width is 512 pixels. 
  542.  
  543. Output 
  544.  
  545. Normally 8 bpp image data as the greyscale equivelent of the bitmap data. 
  546.  
  547. r,g,b or k 
  548.        Forces the red,green or blue component of the image to be written, or 
  549.        alternatively to write the greyscale equivelent (the default). 
  550.  
  551. The Bitmap file format support help panel lists other supported file formats. 
  552.  
  553.  
  554. ΓòÉΓòÉΓòÉ 2.12. X Windows Bitmap ΓòÉΓòÉΓòÉ
  555.  
  556. The .XBM file extension is recognised as a X Bitmap file. 
  557.  
  558. X Bitmap files are ASCII text files, that look to be directly source 
  559. include-able in C programs. 
  560.  
  561. This program is very generous in its parsing of the files. 
  562.  
  563. This program supports X10 and X11 1bpp bitmaps. Some .XBM files with text 
  564. strings inside have been encountered. These looked to be sprites or icons and 
  565. are not supported. 
  566.  
  567. When reading X Bitmaps, 1's are returned as black, 0's as white. 
  568.  
  569. When writing X bitmaps, the darkest colour is written as 1's, the lightest as 
  570. 0's. 
  571.  
  572. This code has been tested on some .XBM files. 
  573.  
  574. The Bitmap file format support help panel lists other supported file formats. 
  575.  
  576.  
  577. ΓòÉΓòÉΓòÉ 2.13. RiscOS Sprite ΓòÉΓòÉΓòÉ
  578.  
  579. The .SPR and .SPRITE file extensions are recognised as a RiscOS sprite file. 
  580. Technically, due to the way the RiscOS works, files don't have extensions. But 
  581. for convenience, I have arbitrarily said .SPR, to allow sprites to fit in with 
  582. all the other image formats. 
  583.  
  584. Input 
  585.  
  586. This code will read 1,2,4 and 8 bpp files. 2bpp files will be expanded to 4bpp 
  587. on reading. 
  588.  
  589. Sprite files can contain an image, or an image and a mask plane. This code will 
  590. ignore the mask plane. 
  591.  
  592. If no palette is present in the file, GBM will assume a default palette similar 
  593. to that used by the RiscOS Wimp. 
  594.  
  595. There is a limitation in that the first-bit field of the sprite header must be 
  596. a multiple of 8 (highly likely). 
  597.  
  598. index=N 
  599.        Can be used if the file contains more than one sprite to specify which 
  600.        sprite in the file to read (default N=0 - the first in the file). 
  601.  
  602. Output 
  603.  
  604. This code will write 1,4 and 8bpp files. 
  605.  
  606. A palette will be written into the file. 
  607.  
  608. Only the image plane is written, ie: no mask plane. 
  609.  
  610. When outputting 8bpp bitmaps, the usual wierd Archimedes palette is written and 
  611. the bitmap data is mapped to this palette. This is because the Archimedes 
  612. cannot support arbitrary 256 colour palettes. The VIDC chip only has 16 palette 
  613. registers, with 16 fixed overrides on (or shades of) each. 
  614.  
  615. GBM writes 16 palette entries to the file. Sprite files can be found with 64 
  616. palette entries (with 4 overrides on each). However, it is seen that these 64 
  617. palette entries are actually just 16 entries with the 4 overrides on each. 
  618. Hence this is equivelent to 16 entries with 16 overrides, except some of the 
  619. overrides are explicitly stored in the file. 
  620.  
  621. Tested reading 4bpp sprites with no palette. 
  622.  
  623. Tested reading 8bpp sprites with no palette and with 64 entry palette. 
  624.  
  625. Sprites generated by GBM have been loaded on RiscOS. Remember: Use SetType to 
  626. change type of file from PC-file to Sprite, by SetType option of filer menu or 
  627. "*SetType <filename> Sprite". 
  628.  
  629. The Bitmap file format support help panel lists other supported file formats. 
  630.  
  631.  
  632. ΓòÉΓòÉΓòÉ 2.14. IBM Printer Page Segment ΓòÉΓòÉΓòÉ
  633.  
  634. The following file extensions 
  635.  
  636.   .PSE .PSEG .PSEG38PP .PSEG3820
  637.  
  638. are recognised as PSEG files. 
  639.  
  640. PSEG files are used as a way to include image data in SCRIPT documents. 
  641.  
  642. PSEG files only contain 1bpp data, which is always ink on paper, ie: black on 
  643. white. 
  644.  
  645. Input 
  646.  
  647. PSEG files should be downloaded from the host in binary mode. No EBCDIC/ASCII 
  648. conversion should be used in the download process. 
  649.  
  650. The palette is always returned as black 1's on white 0's, because PSEG files do 
  651. not include any palette. 
  652.  
  653. fixrec 
  654.        Some PSEG files have been observed to have shorter records than 
  655.        specified in the length field (2nd and 3rd bytes) of a record. Although 
  656.        this doesn't matter when on VM, it can confuse non-VM readers, such as 
  657.        GBM. GBM can be told to attempt to compensate for this corrupt record 
  658.        structure using the fixrec option. 
  659.  
  660. Output 
  661.  
  662. When writing PSEG files, any colour palette is lost. 
  663.  
  664. The resulting file is a binary file and should be uploaded to a VM machine as 
  665. such. No EBCDIC/ASCII conversion should be used. However, on a VM host, the 
  666. record structure of a PSEG is necessary for it to be correctly interpreted by 
  667. the VM tools. On non VM systems, files do not have a record structure. 
  668. Therefore after uploading, the PSEG files must be 'fixed'. You need a tool, 
  669. like FIXL3820 EXEC to do this. Basically, each PSEG files record starts with a 
  670. 0x5a character, and this can be used to delineate records. 
  671.  
  672. PSEG files are a multiple of 8 pixels wide, so this code writes a file with the 
  673. width the next multiple of 8 pixels wide. The right edge is padded with white 
  674. pixels. 
  675.  
  676. double 
  677.        There is a scale factor in the PSEG header. By specifying this option, 
  678.        the scale factor is written as double the usual value. 
  679.  
  680. The Bitmap file format support help panel lists other supported file formats. 
  681.  
  682.  
  683. ΓòÉΓòÉΓòÉ 2.15. Others ΓòÉΓòÉΓòÉ
  684.  
  685. Support for all the bitmap file formats may be added at any time, without 
  686. application writers being aware of it. 
  687.  
  688. Any new formats will be listed in the dialog filetype combobox, although the 
  689. help may not (yet) have an entry for them. 
  690.  
  691. The Bitmap file format support help panel lists other supported file formats. 
  692.  
  693.  
  694. ΓòÉΓòÉΓòÉ 3. Bitmap File format Credits ΓòÉΓòÉΓòÉ
  695.  
  696. This code is the work of :- 
  697.  
  698.  
  699. {{{ Andy Key
  700.  
  701. Internet: ak@vnet.ibm.com
  702. IBM-VNET: AKEY AT HVTVM5
  703.  
  704. Electronic addresses valid at least until September 1994. 
  705.  
  706. I would like to thank all the numerous people who have helped by providing 
  707. sample bitmap files and file specifications.