home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #19 / NN_1992_19.iso / spool / comp / sys / atari / st / tech / 4669 < prev    next >
Encoding:
Internet Message Format  |  1992-09-02  |  1.6 KB

  1. Path: sparky!uunet!cs.utexas.edu!swrinde!news.dell.com!math.utexas.edu!ut-emx!ccwf.cc.utexas.edu
  2. From: timg@ccwf.cc.utexas.edu (Tim Gallivan)
  3. Newsgroups: comp.sys.atari.st.tech
  4. Subject: Need fast image conversion algorithm.
  5. Message-ID: <79002@ut-emx.uucp>
  6. Date: 3 Sep 92 06:21:48 GMT
  7. Sender: news@ut-emx.uucp
  8. Organization: University of Texas Center for Relativity
  9. Lines: 39
  10.  
  11. Hi,
  12.  
  13. Does anyone have a fast algorithm (or some code) to transform
  14. a packed color image into the appropriate number of color planes?
  15. The packed format for a 4-bit image looks like this:
  16.  
  17.             byte
  18.  
  19.     1            2            3
  20.  
  21. XXXX XXXX    XXXX XXXX    XXXX XXXX  ....
  22.  
  23.  1    2       3    4       5    6
  24.  
  25.            pixel
  26.  
  27.  
  28. Ghostscript produces color images in the above format (sort of, I
  29. actually have to sample an 8-bit image).  For portability, I need to
  30. first convert this to the standard GEM format of four color planes, and
  31. then transform it again to the machine specific format. There is a vdi
  32. routine for the last transformation, but I have to do the first myself.
  33. All these transformations hog time and memory, so I would like to make
  34. the one I have to write as fast as possible.
  35.  
  36. The GS screen driver is written in C, but assembly routines would be OK.
  37. It would also be nice if the algorithm could handle 2, 4, 8, 16 and 32
  38. bit color.
  39.  
  40. Maybe some hot game hacker could code this up for me to show doubters
  41. that there is still a useful place in the world for his kind of
  42. programming (just wishful thinking :-); or maybe I should announce
  43. a programming contest, yeah, that's it. The winner gets a free copy
  44. of Ghostscript!
  45.  
  46. Thanks,
  47.  
  48. Tim Gallivan
  49. timg@landau.ph.utexas.edu
  50.