[Subject Prev][Subject Next][Thread Prev][Thread Next][Subject Index][Thread Index]

Re: How to print to file in svgalib?

On Mon, 3 Jul 2000 lists@xxxxxxxxxxxx wrote:
> 	I've been struggling to get an output of my screen graphics for
> the last 2 months. I just need a picture in jpg/png ( a screenshot). How
> do I do this?
> 	I am running at 1024x768 at 256 colors (mode 12)
> 	I can dump a 1024x768 byte memory tofile which I fill with
> gl_getbox(0,0,1024,768,memory_dump_pointer)
> 	I can also get a color table of 768 bytes with
> gl_getpalette(color_table_pointer)
> 	I save these dumps to file and use netpbm's
> raw2gif -s 1024 768 -p color_table_file memory_dump_file > out.gif

Check that the raw files are really correct:
Try clearing the screen and only drawing a single pixel of color 3 at
(1,1) and then dump to file and check that the file is all zeros, except
for a 3 in the 1025th byte.
Set the palettet to something, and see if the color table file after you
run your program has the values you programmed.

Matan Ziv-Av.                         matan@xxxxxxxxxxx