home *** CD-ROM | disk | FTP | other *** search
/ Crawly Crypt Collection 1 / crawlyvol1.bin / graphics / gifspc / gifspc.doc next >
Text File  |  1990-10-06  |  9KB  |  194 lines

  1.  
  2.                               G I F S P C
  3.  
  4.              The GIF to Atari Spectrum 512 Picture Converter
  5.  
  6.                             by Steve Belczyk,
  7.                 SysOp of the Genesis BBS, (508) 664-0149
  8.                         (Four lines, fifty megs)
  9.  
  10.  
  11.  
  12. Permission is granted to distribute this program freely, provided that this
  13. documentation file accompanies it, unaltered.  Commercial use of this product
  14. is prohibited without permission of the author.
  15.  
  16.  
  17. Introduction:
  18.  
  19. For over a year I've been converting GIF pictures into Spectrum 512 format
  20. for the Atari ST using two kludgy programs I wrote a long time ago.  After
  21. receiving several requests, I finally munged them together and cleaned up
  22. the result.  Here it is, at last!
  23.  
  24.  
  25. Operation:
  26.  
  27. Those of you who are familiar with my IFFSPC program should feel quite
  28. comfortable using GIFSPC.  If you haven't been using IFFSPC, however, here's
  29. how to use GIFSPC:
  30.  
  31. GIFSPC must be run in low resolution.  It also requires a few big buffers,
  32. so, if you're using a 520, get rid of that ramdisk and those greedy desk
  33. accessories.  After the tacky title page, you will be presented with the
  34. usual file selector dialog box.  Select the GIF file you wish to convert.
  35.  
  36. After selecting the victim, you will be tersely asked if you would like
  37. dithering.  Pictures almost always look better dithered, so YES is most
  38. likely your best bet.  It's also the default.  More on dithering below.
  39.  
  40. The screen will clear, the input file will be read, and then decompression
  41. will begin.  This can take a while, especially for big files.  When
  42. decompression is completed, row after row of ghastly colors will be plotted.
  43. DON'T PANIC!  These colors bear little resemblance to the ultimate appearance
  44. of the picture.  Nevertheless, I love to try and guess what the picture
  45. will look like by scrutinizing these pseudo-colors.
  46.  
  47. Once the screen has been entirely painted, the disk drive will come on
  48. again.  GIFSPC is now trying to write name.SPC (assuming you chose name.GIF
  49. as the input file).  ANY EXISTING name.SPC WILL BE CLOBBERED!  If all goes
  50. well, a message indicating success will appear.  At this point you'll rush
  51. off to try the pic with SPSLIDE or SPECTRUM.  I hope it turned out well.
  52.  
  53.  
  54. Error messages:
  55.  
  56. "Can't open input file."  This one's pretty straightforward.  Either you
  57. specified a file that doesn't exist or it is badly damaged.
  58.  
  59. "Premature EOF."  The GIF file is too short.  Most likely cause of this
  60. error is an incomplete file transfer at some point.
  61.  
  62. "Not a GIF pic."  The 6-byte header of the so-called GIF file indicates
  63. that this is not an GIF file.  I get this if I forget to de-ARC the file.
  64.  
  65. "Bad GIF file."  At some point during decompression, the GIF file violated
  66. the rules of the compression algorithm.
  67.  
  68. "Can't open output file."  The Fcreate failed on the output SPC file.  Either
  69. the disk is full, damaged, or write-protected.
  70.  
  71. "Write error (disk full?)"  GIFSPC couldn't write the entire SPC file.  The
  72. disk is either full or damaged.
  73.  
  74.  
  75. Theory of operation (or, Why they don't always turn out great):
  76.  
  77. Each horizontal scan line of a GIF picture can contain as many as 256
  78. different colors.  Spectrum, on the other hand, permits a maximum of 42
  79. colors per scan line (plus black).  So, GIFSPC's main task is to take a line
  80. of as many as 256 colors and somehow "dissolve" it into a line of no more
  81. than 42 colors, while preserving as much of the quality of the original pic
  82. as possible.  To make matters worse, Spectrum does not allow any pixel on the
  83. line to have any of the 42 colors.  Each pixel has only 14 colors to choose
  84. from.  This can make life pretty miserable for GIFSPC.
  85.  
  86. Generally speaking, the way GIFSPC handles this is to sort the pixels on the
  87. scan line by how popular each desired color is on that particular line.  In
  88. this way, popular colors get the most attention.  The remaining, less popular
  89. colors are simply assigned the popular color that is the closest fit.  It is
  90. unavoidable that what GIFSPC thinks is an unimportant color may turn out to
  91. be a color that we humans think is very important.  This seems to happen most
  92. often in pictures with faces; the bridge of the nose occupies very few pixels,
  93. but it is exactly where we tend to focus on a face.  GIFSPC thinks these pixels
  94. are unimportant, hence you may wind up with an unsightly blemish on the nose.
  95. (To those of you who have used IFFSPC:  This effect is much less likely
  96. when converting GIF files since GIF files have a maximum of 256 colors per
  97. scan line, versus the Amiga's 640 colors.)
  98.  
  99.  
  100. More on dithering:
  101.  
  102. Even the magic of Spectrum could not improve on the fact that the ST is
  103. limited, in hardware, to a total of 512 colors, three bits for each of
  104. the primary colors red, green, and blue.  The Amiga sports FOUR bits for
  105. each primary, giving it 4096 colors.  This is a significant difference.
  106.  
  107. GIFSPC (and Spectrum) use a technique called "dithering" to increase the
  108. number of available colors.  To render an Amiga color that the ST can't
  109. produce, every other pixel is assigned one of the two closest ST colors.
  110. This works much better than it may sound.  I find that the patterns
  111. introduced by dithering actually contribute to the overall quality of
  112. the picture.
  113.  
  114. Here's the rub:  Dithering can nearly double the number of colors that
  115. GIFSPC has to deal with on each scan line.  That's why you are given the
  116. option to dither or not to dither.  If a picture does not turn out too
  117. well dithered, cross your fingers and try it without dithering.
  118.  
  119.  
  120.                        Good luck with the program!
  121.  
  122.                               Steve Belczyk
  123.  
  124.  
  125. P.S.  You can reach me electronically any of these ways:
  126.  
  127.     CompuServe: [75126,515]            Genie: sbelczyk
  128.  
  129.     UUCP: {harvard,vaxine}!bunny!seb3  CSNet: seb3@gte.COM
  130.  
  131.     BBS: (508) 664-0149 (1200 baud)    SteveNet: GENESIS:Steve1
  132.          (508) 664-2214 (2400 baud)              1/1:Steve1
  133.  
  134.  
  135.               ----- Attention Bulletin Board SysOps! -----
  136.  
  137.  
  138. The most powerful BBS software ever written is available now for your Atari
  139. ST or IBM compatible.  Announcing...
  140.  
  141.  
  142.                            S t e v e N e t !
  143.  
  144.  
  145. The three Steves have combined their efforts and developed the BBS program
  146. the world has been waiting for.  Here are some of SteveNet's unique features:
  147.  
  148.  
  149.     o  Multi-tasking:  SteveNet supports multiple modems.  In addition,
  150.        the system console is always available for your use.  You may log
  151.        in, read messages, and perform system maintenance while other
  152.        callers are using your system.
  153.  
  154.     o  Networking:  More than just the ability for one BBS to connect
  155.        to another, SteveNet brings advanced computer networking concepts,
  156.        hitherto available only on mainframe computers, to the micro-
  157.        computer community.  Network message bases, network games,
  158.        network chat, and network Email are all possible.
  159.  
  160.     o  Forth:  SteveNet includes a complete, no-holds-barred, multi-
  161.        user Forth program development language.  You and your callers
  162.        can write games, utilities, and even programs that communicate
  163.        with one another over the network, using Forth.
  164.  
  165.     o  User Interface:  SteveNet offers two extremely powerful user
  166.        interfaces:  a command language and a menu system.  You can create
  167.        your own hot-keyed menus, with each key assigned to any sequence
  168.        of shell commands.  The command shell supports batch files,
  169.        command aliasing, variable substitution, and background execution.
  170.  
  171.     o  And much more:  Real-time chat (including network chat with an
  172.        unlimited number of other SteveNet nodes), unlimited zero-
  173.        maintenance message bases, Email, Xmodem and Ymodem transfers,
  174.        FidoNet compatibility, a dumb terminal mode to allow outgoing
  175.        calls (and file transfers!) on unused lines, full file and user
  176.        security functions, and lots more.
  177.  
  178. SteveNet is currently running on both IBM compatible and Atari ST machines.
  179. Macintosh and Amiga ports are planned.
  180.  
  181. In the hacker spirit, SteveNet is very reasonably priced.  For less than
  182. you might spend on a single game, your BBS can join the SteveNet!
  183.  
  184. SteveNet authors:  Steve1 (Steve Belczyk)
  185.                    Steve2 (Steve Gerakines)
  186.                    Steve3 (Stephen Agneta)
  187.  
  188. For more information on SteveNet, please contact me at one of the electronic
  189. addresses given above.
  190.  
  191.                                                                 Steve1
  192.  
  193. --------------------------------- 8< ---------------------------------------
  194.