home *** CD-ROM | disk | FTP | other *** search
/ Acorn User 2 / AUCD2.iso / internet / gifpack.arc / Docs / gif2spr_2 < prev    next >
Text File  |  1995-10-17  |  7KB  |  178 lines

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