View Full Version : Saving the OpenGL Graphics as a JPEG
09-07-2003, 08:45 PM
I have a Layout drawn using the OpenGL Commands,the Layout may be a Rectangle or anything...I want to know how can i save it as a JPEG.
not only JPEG is there any option for BMP files..
waiting for ur reply,
09-07-2003, 09:07 PM
If you poke around in the archive a bit you will find tons of solutions to this, OpenGL itself does not have support for saving images, you can use glReadPixels to get image to a memory buffer, then use a library that support your image format (libjpeg...) or make some code yourself (www.wotsit.org)
09-07-2003, 09:27 PM
Thanks a lot for ur reply,
I think that might work out...by reading each and every pixel and storing it..
anywayz i have an another alternative way....since am working on LINUX..
in the Designer..there is an command available to grab the Window and store it as an image...
the only thing there will be playing wid the coordinates...
anywayz thanks a lot..
09-07-2003, 11:05 PM
You don't have to read each pixel by calling glReadPixels for each pixel, glReadPixels can copy the entire window contents in one call.
09-08-2003, 02:57 AM
Thats nice...saves lot of time...
Powered by vBulletin® Version 4.2.2 Copyright © 2016 vBulletin Solutions, Inc. All rights reserved.