home *** CD-ROM | disk | FTP | other *** search
/ Crawly Crypt Collection 1 / crawlyvol1.bin / graphics / iffspc / iffspc.doc next >
Text File  |  1985-11-19  |  9KB  |  188 lines

  1.  
  2.                                  IFFSPC
  3.  
  4.                The Amiga IFF to Atari ST Picture Converter
  5.  
  6.                                 (C) 1987
  7.                              Steve Belczyk,
  8.                 SysOp of the Genesis BBS, (617) 664-0149
  9.  
  10.                         CompuServe: [75126,515]
  11.                             Genie: sbelczyk
  12.  
  13. Shareware notice:
  14.  
  15. This is a shareware product.  If you find it useful (and if you use it to
  16. convert more than one or two Amiga pics I imagine that means you found it
  17. useful), I urge you to send $15, or whatever you feel it's worth, to the
  18. author at this address:
  19.  
  20.                         Steve Belczyk
  21.                         453 Park Street West,
  22.                         North Reading, MA  01864
  23.  
  24. Permission is granted to distribute this program freely, provided that this
  25. documentation file accompanies it, unaltered.  Commercial use of this product
  26. is prohibited without permission of the author.
  27.  
  28.  
  29. Introduction:
  30.  
  31. Once upon a time, not too long ago, Atari ST owners, while otherwise perfectly
  32. satisfied with their machines, lamented over the limitation of sixteen colors
  33. at a time.  They could not hope to display pictures of photographic quality
  34. that were commonplace in the Amiga world.  In despair, they plodded through
  35. bland Degas and Tiny pictures.
  36.  
  37. But lo!  Unto these sad souls was delivered Spectrum 512!  This brilliant
  38. program was capable of displaying pictures using the entire palette of 512
  39. colors!  Moreover, with the clever use of dithering it became possible to
  40. display 4096 colors, just like on the Amiga.  The ST graphics community was
  41. set on its ear.
  42.  
  43. This program, IFFSPC, can read any Amiga IFF picture and will do its best
  44. to turn it into an SPC picture which can be displayed by any of the Spectrum
  45. slideshow programs (SPSLIDE, SPSLID5, and SPSLID7), as well as being read
  46. into Spectrum itself for further editing.  There are no size or resolution
  47. restrictions such as those imposed by Spectrum 512.
  48.  
  49.  
  50. Operation:
  51.  
  52. IFFSPC must be run in low resolution.  It also requires a few big buffers,
  53. so, if you're using a 520, get rid of that ramdisk and those greedy desk
  54. accessories.  After the tacky title page, you will be presented with the
  55. usual file selector dialog box.  The Amiga community is not very picky
  56. about extensions on file names, but hopefully you will have renamed your
  57. Amiga pics with a .IFF extension, since that is the default for input to
  58. IFFSPC.  I would hope that everyone will keep the name of the SPC pic as
  59. close to the name of the original Amiga pic as possible, so we don't wind
  60. up with half a dozen SPC pics all made from the same Amiga pic.
  61.  
  62. After selecting the victim, you will be tersely asked if you would like
  63. dithering.  Pictures almost always look better dithered, so YES is most
  64. likely your best bet.  It's also the default.  More on dithering below.
  65.  
  66. The screen will clear, the input file will be read, and then row after row
  67. of ghastly colors will be plotted.  DON'T PANIC!  These colors bear little
  68. resemblance to the ultimate appearance of the picture.  Nevertheless, I love
  69. to try and guess what the picture will look like by scrutinizing these pseudo-
  70. colors.
  71.  
  72. Once the screen has been entirely painted, the disk drive will come on
  73. again.  IFFSPC is now trying to write name.SPC (assuming you chose name.IFF
  74. as the input file).  ANY EXISTING name.SPC WILL BE CLOBBERED!  If all goes
  75. well, a message indicating success will appear.  At this point you'll rush
  76. off to try the pic with SPSLIDE or SPECTRUM.  I hope it turned out well.
  77.  
  78.  
  79. Error messages:
  80.  
  81. "Can't open input file."  This one's pretty straightforward.  Either you
  82. specified a file that doesn't exist or it is badly damaged.
  83.  
  84. "Premature EOF."  The IFF file is too short.  Most likely cause of this
  85. error is an incomplete file transfer at some point.
  86.  
  87. "Not an IFF pic."  The 12-byte header of the so-called IFF file indicates
  88. that this is not an IFF picture file, or perhaps not an IFF file at all.
  89. I get this if I forget to de-ARC the file.
  90.  
  91. "Unacceptable resolution."  The resolution of the picture is not one of
  92. these:  320x200, 320x400, 640x200, or 640x400.  I've never run into this
  93. problem.
  94.  
  95. "Can't open output file."  The Fcreate failed on the output SPC file.  Either
  96. the disk is full, damaged, or write-protected.
  97.  
  98. "Write error (disk full?)"  IFFSPC couldn't write the entire SPC file.  The
  99. disk is either full or damaged.
  100.  
  101.  
  102. Theory of operation (or, Why they don't always turn out great):
  103.  
  104. Each horizontal scan line of an Amiga picture can contain as many as 640
  105. different colors.  Spectrum, on the other hand, permits a maximum of 42
  106. colors per scan line (plus black).  So, IFFSPC's main task is to take a line
  107. of as many as 640 colors and somehow "dissolve" it into a line of no more
  108. than 42 colors, while preserving as much of the quality of the original pic
  109. as possible.  To make matters worse, Spectrum does not allow any pixel on the
  110. line to have any of the 42 colors.  Each pixel has only 14 colors to choose
  111. from.  This can make life pretty miserable for IFFSPC.
  112.  
  113. Generally speaking, the way IFFSPC handles this is to sort the pixels on the
  114. scan line by how popular each desired color is on that particular line.  In
  115. this way, popular colors get the most attention.  The remaining, less popular
  116. colors are simply assigned the popular color that is the closest fit.  It is
  117. unavoidable that what IFFSPC thinks is an unimportant color may turn out to
  118. be a color that we humans think is very important.  This seems to happen most
  119. often in pictures with faces; the bridge of the nose occupies very few pixels,
  120. but it is exactly where we tend to focus on a face.  IFFSPC thinks these pixels
  121. are unimportant, hence you may wind up with an unsightly blemish on the nose.
  122. In the way of reassurance, however, let me say that, of the thirty or forty
  123. Amiga pics I have converted with this program, only two or three turned out
  124. unsatisfactorily.  But you are warned.
  125.  
  126.  
  127. More on dithering:
  128.  
  129. Even the magic of Spectrum could not improve on the fact that the ST is
  130. limited, in hardware, to a total of 512 colors (Colorburst notwithstanding),
  131. three bits for each of the primary colors red, green, and blue.  The Amiga
  132. sports FOUR bits for each primary, giving it 4096 colors.  This is a
  133. significant difference.
  134.  
  135. Colorburst solves this problem by flipping rapidly between the two closest
  136. ST colors to obtain the desired Amiga color.  Very clever, but it does result
  137. in that unsightly flicker.  IFFSPC (and Spectrum) use a technique called
  138. dithering.  To render an Amiga color that the ST can't produce, every other
  139. pixel is assigned one of the two closest ST colors.  This works much better
  140. than it may sound.  I find that the patterns introduced by dithering actually
  141. contribute to the overall quality of the picture.
  142.  
  143. Here's the rub:  Dithering can nearly double the number of colors that
  144. IFFSPC has to deal with on each scan line.  That's why you are given the
  145. option to dither or not to dither.  If a picture does not turn out too
  146. well dithered, cross your fingers and try it without dithering.
  147.  
  148.  
  149. Amiga pic pointers:
  150.  
  151. Before you go running off to the local Amiga board and snarf up every IFF
  152. file you find, there are a few things you should know about Amiga pics.
  153.  
  154. First of all, the IFF format is used by Amiga owners to exchange plenty of
  155. things besides picture files.  Don't download something just because the
  156. description mentions IFF; you might get an Amiga sound file.  Instead, look
  157. for keywords like HAM or ILBM along with the IFF.  Also, there is an Amiga
  158. feature called color-cycling which IFFSPC does not support.  Avoid pictures
  159. that mention color-cycling, or just plain cycling.
  160.  
  161. As I mentioned before, Amiga owners are not very strict about naming their
  162. files.  I've seen picture files with extensions IFF, HAM, PIC, and more.
  163. In fact, most of the picture files had no extension whatsoever.  After I
  164. de-arc an Amiga file (fortunately, they use the same ARC program!) I always
  165. rename it to something.IFF.
  166.  
  167. While it's true that the Amiga has better resolution and more colors than
  168. the ST, that does not mean they're aren't just as many lousy hand-done pics
  169. for the Amiga.  Personally, I much prefer digitized photographs.  The big
  170. paint program for the Amiga is called Digi-paint, and the big digitizer is
  171. called Digi-view.  I grab everything that mentions Digi-view, and avoid
  172. everything that mentions Digi-paint.  There is also a slick ray-tracing
  173. program for the Amiga called Sculpt-3D.  I liked some of those.  But the
  174. digitized HAM pics are the best.
  175.  
  176.  
  177. Source code:
  178.  
  179. If you would like to try to wade through the source code for IFFSPC (about
  180. 800 lines of developer's C), you may obtain a printout by simply sending me
  181. a SASE and $10.
  182.  
  183.  
  184.  
  185.                        Good luck with the program!
  186.  
  187.                                 Steve B
  188.