From: Carlos Pereira <carlos@pe...> - 2001-04-09 22:24:11
> > I am new here...
> > I wonder how I can to save an image 3d to file jpg or gif, or other format....
> > I say, is there a function of mesa with I can to do this?
> > I hope you can helpme...
> I'd recommend reading an already drawn frame buffer (glReadPixels()) and
> then once you have the data (remember to allocate if FIRST) save it to
> whatever exotic image format you want with Imlib.
Mark Kilgard's (green) OpenGL book has an example with
full code to create color and b&w postcript files
from a gl_area, using glReadPixels(). The book says
the code can be retrieved from:
The book section is 2.6, rendering OpenGL into pixmaps.
To create png files, I would suggest O'Rilley's book,
"PNG the definitive guide", written by Greg Roelofs,
one of the main contributors to the png format. It
describes everything related with reading and writting
png files. Use Google to search for libpng, the library
most applications use to handle png files.
Get latest updates about Open Source Projects, Conferences and News.