render to texture

Hello,

I would like to render my scene in a texture and retrieve data from it to write the result in a texture file.

I know how to render in a texture with opengl but I don’t know how to retrieve data from this texture.

If someone could help me…
Thanks a lot.

glGetTexImage

http://www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/getteximage.html