Saving OpenGL Graphics as a JPEG

Hello,
If i have a Layout drawn using OpenGl Commands…the layout may be a Rectangle or anything…
now if i want to save that a JPEG…how can i do that…?
i tried out the GrabWidget option available wid the Designer but doesnt seems to work…
so is there any options available in OpenGL to do this…?
Waiting for ur replies…
Kalpesh.

ksnapshot will take a screenshot of your OGL app. It works perfectly.

Originally posted by kal_mans:
now if i want to save that a JPEG…how can i do that…?

You mean from your program? render, glFinish(); setup_pixel_transfer(); glReadPixels(…); and then use something in the Qt (I’m guessing “Layout” and “Designer” refer to Qt) API that takes a raw RGB image and saves it to a JPEG.

Hi,
Thanks a lot for the Replies…
i have tried out something like GrabWindow…
that seems to be working…
let me try out ksnapshot…

anywayz thanks a lot nukem and m2…
thanks a lot…

  • Kalpesh.

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.