I have a problem, at our shop we have a number of workstations that
only can support 8 bit PseudoColor graphics (ie any color you want
out of 256). I however have been given the task of writing a hardcopy
output module that can create a 24 bit output. At present we grab the
screen after rendering our vector files to it and save the screen
dump as an XWD or other 8 bit raster file. What we require however is
another way of rendering the file to a virtual 24 bit device and then
create an output file from that. What we want do do is this:
1.Create vector graphics metafile
2.Render metafile into a virtual graphics device as a 24 bit 'image'
3.Save data from graphics device (virtual or actual).
Stages 1 and 3 (from screen) we do already, but 2 is giving me some
headaches, I propose creating a 2D array in memory and writing some
code to do rendering of the graphics primitives, set color, set pixel,
draw line, draw circle etc. and then writing this out as a raster file
or to a output device. This however will take me a while and as usual
we need this yesterday. I was wondering if anyone had done this before
and could share their work or point me to some other source on the
'net. I have already found a couple of plotting packages, one of which,
GLE, does follow the above sequence but only for 8 bit dithered colors.
I have tried to decode the source for this but the dithering code kinda
gets in my way of understanding it and I was wondering if anyone knew
of something more appropriate?
Thanks in advance