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