home *** CD-ROM | disk | FTP | other *** search
/ Acorn User 2 / AUCD2.iso / internet / gifpack.arc / Docs / gif2spr next >
Text File  |  1995-10-17  |  6KB  |  173 lines

  1.  $Id: ReadMe 1.5 95/10/17 13:24:43 root Exp $ 
  2.  
  3. •Contents
  4.  
  5. gif2spr
  6. Installation and Usage
  7. Command line Usage
  8. Automated Conversion on the Desktop
  9. Notes
  10. History
  11. Contacting me
  12.  
  13. •gif2spr Version 1.06a
  14.  
  15. A simple program to convert gif87a and gif89a graphic formats to Acorn
  16. Sprite format. Transparency masks for the GIF files are created to
  17. improve the appearance of the sprite. Version 1.06a will be the seventh release.
  18.  
  19. I cannot be held responsible for any damage or loss of data as a result of
  20. use or missuse of this program.
  21.  
  22. •Installation and Usage
  23.  
  24. There are currently several other programs that require gif2spr to work correctly
  25. these normally include the latest version as of their release date. If you wish
  26. to update one of those version please check the documentation of those programs
  27. first but it should only require copying the new version of gif2spr to be copied
  28. into the appropriate place.
  29.  
  30. Command line installation
  31.  
  32. Please ensure that gif2spr is in a directory pointed to by Run$Path, my copy is
  33. saved in the library directory of my harddisc and my Run$Path looks like this.
  34.  
  35. Show Run$Path 
  36. Run$Path(Macro) : ,%.,Boot:Library.,ADFS::HardDisc4.$.Library.
  37.  
  38. •Command line Usage
  39.  
  40. You can enter the pathname of a gif as the first file argument and
  41. the pathname of the sprite file as the second file argument.
  42.  
  43. gif2spr [-qvh?] RAM:$.in [-o] RAM:$.out
  44.  
  45. There are two options that can also be used.
  46.  -q stops gif2spr generating error messages when things go wrong, useful when
  47.        called by other programs
  48.  -v generates verbose output.
  49.  -o specifies the output file, if two file names are given on the command line
  50. then the second is the output file.
  51.  -h lists the command line options and version number
  52.  -? lists the command line options and version number
  53.  
  54.  
  55. •Automated Conversion on the Desktop
  56.  
  57. The Following was suggested by Peter Burwood in demon.ip.support.archimedes.
  58. Create a directory called !gif2spr, in it place the following two obey files.
  59. This will create an application that when seen will allow you to double click on
  60. a gif89 file and have it converted and loaded into !Paint automatically without
  61. touching the command line.
  62.  
  63. Note you will have to use a filetype other than the registered gif type (695)
  64. if you want to be able to double click on gif87 format files and have them
  65. loaded into some other program. The file type used in this example is 089 and
  66. is named 'gif89'.
  67.  
  68. Also note that the sprite generated by gif2spr is left in the scrap directory,
  69. it can be deleted manually or automatically by uncommenting the last line of
  70. the !Run file.
  71.  
  72.  
  73. -------- !Boot file ------------------------------
  74. Set File$Type_089 GIF89
  75. If "<gif2spr$Dir>" = "" Then Set gif2spr$Dir <Obey$Dir>
  76. If "<gif2spr$Path>" = "" Then Set gif2spr$Path <Obey$Dir>.
  77. If "<Alias$@RunType_089>" = "" Then Set Alias$@RunType_089 Run gif2spr:!Run %%*0
  78. IconSprites <Obey$Dir>.!Sprites
  79. --------------------------------------------------
  80.  
  81. -------- !Run file -------------------------------
  82. IconSprites <Obey$Dir>.!Sprites
  83. Set gif2spr$Dir <Obey$Dir>
  84. Set gif2spr$Path <Obey$Dir>.
  85. Set File$Type_089 GIF89
  86. Set Alias$@RunType_089 Run gif2spr:!Run %%*0
  87. |
  88. IF "<Wimp$ScrapDir>" = "" Then ERROR 0 Scrap Application has not been seen
  89. |
  90. WimpSlot -min 128K -max 128K
  91. Run <Obey$Dir>.gif2spr %0 <Wimp$ScrapDir>.gif2sprtmp
  92. Filer_Run <Wimp$ScrapDir>.gif2sprtmp
  93. |%delete <Wimp$ScrapDir>.gif2sprtmp
  94. -------- !Run file -------------------------------
  95.  
  96.  
  97. •Notes
  98.  
  99. Only sprites with square pixel aspect ratios are generated.
  100.  
  101. This program appears to be at least twice as fast as ChangeFSI even
  102. though ChangeFSI has hand coded LZW decompression. This made me very
  103. happy when I tested it.
  104.  
  105. I've tested the program on 1,2,4,6,7,8 bits per pixel all the routines
  106. have been tested since 3bpp uses the 4bpp routines and 5,6,7bpp uses 8bpp
  107. I've only tested the transparency on 8bpp and 1bpp gifs, but the masking code is
  108. almost identical to the pixel code so should not cause any problems. I
  109. did check that part of the code for typos. The images I have were not
  110. suitable for creating transparency masks as they were scanned in and
  111. did not have large areas of single colour. This program has now been
  112. in use for many months with very few reported errors, if you find any
  113. please send me the report generated by gif2spr when run with the -v
  114. option on the offending GIF file. The GIF file would also be of use.
  115.  
  116. •History
  117.  
  118. 1.03 The code to deal with interlaced gif's has been re-coded since version
  119. 2 and is more likely to work correctly. Previously some images had a few
  120. lines in the wrong place making the image look quite odd.
  121.  
  122. 1.04 has fixed a rare problem that occured when GIF's with multiple graphic
  123. extensions caused the error message  'liblug: Unkown input file type'
  124.  
  125. 1.05 Another Rare error this was created by me several versions ago. It only
  126. happens when an empty transparent index graphic extension occurs in the data
  127. stream and generates the message 'liblug: Unkown input file type'
  128.  
  129. 1.06 It appears that there is a program out there on the Mac that generates GIFs
  130. with an extra byte compressed on the end of the image data. The effect was to
  131. overwrite the beginning of another malloc'd block and caused an error when trying
  132. to free that memory. The extra byte only occures when a scan line is a multiple
  133. of 4 pixels. I have 6 examples of this problem.
  134.  
  135. Another problem generated by a Mac program (possibly the same) caused the
  136. same error message as above to occur but was because the gif had a strange
  137. definition for it's colour map and caused an unallocated pointer to be freed
  138. (This is partly bad programming but should not have occured if the gif had had
  139. it's flags set correctly). As a result of all this gif2spr is now more tolerant
  140. of strange GIF files.
  141.  
  142. 1.06a The command line is now parsed by getopt allowing more flexibility and reliability.
  143.  
  144. My Thanks go to the following people (in no particular order) for suggestions and fault reports etc.
  145.  
  146.  Peter Burwood
  147.  Andrew Pullan
  148.  Doug Winter
  149.  Ben Schofield
  150.  Philip Banks
  151.  Stewart Brodie
  152.  Mike Cook
  153.  Steve Ellacott
  154.  Peter Burwood
  155.  
  156.  
  157. •Contacting me
  158.  
  159. This is the Seventh distribution and was made on the 17th October 1995
  160.  
  161. Simon Truss 
  162. mailto:simon@bigblue.demon.co.uk
  163.  
  164. I can be contacted at the following address for a few years yet
  165. (It has to be forwarded on, but it will reach me)
  166.  
  167. 23 Charlton Gardens 
  168. Coulsdon 
  169. Surrey 
  170. CR5 1AS 
  171. Last Upated "Oct 17 1995"
  172.  
  173.