Path: utzoo!utgpu!news-server.csri.toronto.edu!mailrus!cs.utexas.edu!rice!sun-spots-request From: wsd@cs.brown.edu (Wm. Scott `Spot' Draves) Newsgroups: comp.sys.sun Subject: Re: help with rasterfiles Keywords: Windows Message-ID: <6659@brazos.Rice.edu> Date: 13 Apr 90 08:25:09 GMT Sender: root@rice.edu Organization: Sun-Spots Lines: 20 Approved: Sun-Spots@rice.edu X-Refs: Original: v9n114 X-Sun-Spots-Digest: Volume 9, Issue 114, message 5 You can't have pixrects with arbitrary numbers of bits per pixel, but you can do what you want by using the clut. Say you wanted 4bits per pixel. Combine every pair of 8 bit images into a new 8 bit image with the bits split 4 and 4 (say put the first image in the low 4 bits). save both 16 entry luts (you can save them in the first 32 entries of the lut that is stored with the image; this would look awful if the image were actually viewed with it). Then, when it comes time to display the images, load the 8 bit combined image. Then load the clut to ignore the high bits. Wait 1/30th of a second (or whatever). then reload the lut to ignore the low bits. Then go on to the next image. It is best to the images/clut during vertical retrace. This might block till a vertical retrace: ioctl(screen->fd, FBIOVERTICAL, 0); /* Ack! syscalls! */ Scott Draves Space... The Final Frontier wsd@cs.brown.edu uunet!brunix!wsd Box 2555 Brown U Prov RI 02912