help with rasterfiles
Wm. Scott `Spot' Draves
wsd at cs.brown.edu
Fri Apr 13 18:25:09 AEST 1990
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 at cs.brown.edu
uunet!brunix!wsd
Box 2555 Brown U Prov RI 02912
More information about the Comp.sys.sun
mailing list