Q:

opengl pixel data to jpeg

Any C++ examples available to convert raw pixel data obtained from glReadPixels to JPEG format and back?

A:

You can use ImageMagick library to convert raw data to the jpeg image data, and opposite. Using the same library, you can convert jpeg image data into raw (RGB) data.

