View Full Version : Save screen as an image file

11-30-2008, 08:52 AM

im currently trying to do a save screen as image file from my current OpenGL window. So its like when i press a button, the program save the current image in the OpenGL window as an image file. I currently able to do it manually, and save it as a TGA image. But I think other kind of file such as JPEG will be a hell of an algorithm to start from scratch. Is there any library so i can save the image to other type of image file such as JPEG?

Thanks in advance

11-30-2008, 09:07 AM
There is JasPer (http://www.ece.uvic.ca/~mdadams/jasper/) and libjpeg (http://www.ijg.org/).

11-30-2008, 10:11 AM
And freeimage (http://freeimage.sourceforge.net/) for a bunch of formats.

12-01-2008, 01:38 AM
DevIL aka OpenIL (http://openil.sourceforge.net/)