home *** CD-ROM | disk | FTP | other *** search
/ Power-Programmierung / CD1.mdf / rexx / library2 / gbmrexx / gbmdlg / gbmdlg.scr < prev    next >
Text File  |  1993-09-12  |  28KB  |  579 lines

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