render to texture


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.