Pixel buffer
What is the best method, meaning fastest or most flexible or is there a tradeoff? If you could give me a few ideas or point me in the right direction I would be much appreciative.
I'm really just concerned about direct control over gamma, brightness, contrast, that sort of thing. Would also be nice to hear about any useful ideas for maybe having a histogram or something that could help correct over or underexposure for post processed images.
I'm sure there's a whole list of websites or pages somewhere that has info on this, but I would like to hear some recomendations, maybe a specific site that focuses on post processing operations.
You would be much better off doing these operations using a pixel shader on the GPU. If you use the CPU, it will absolutely ruin performance.
I'm really just concerned about direct control over gamma, brightness, contrast, that sort of thing.
To do this, you'd use FBO's which let you render directly to a texture. You can render a quad to a new texture, which uses a pixel shader that reads the old texture and modifies it in some way.
Reading back data on the CPU is fundamentally at odds with the way that GPU's and drivers work. The driver wants to buffer commands well ahead of when the GPU executes them, and then the GPU works on rendering while the CPU is submitting commands for the next frame or the frame after. This ensures that the CPU and GPU are working in parallel, so that you're utilizing both at the same time. Whenever you read back data from the GPU, you effectively insert a sync point where the CPU has to flush all pending commands, and sit around idle while it waits for the GPU to finish rendering. This then causes the GPU to stall while it waits for the CPU to issue more commands.
I agree with Hodgman: the kinds of operations you've mentioned would be many times more efficient if performed in a fragment shader on the GPU. It will avoid stalls, plus it's extremely likely that the GPU can do the work much faster than a CPU could.
As MJP said, a good, cross-platform, well documented method people use is a fragment shader. If you're using OpenGL, just google around for GLSL tutorials. For DX, you'd want HLSL tutorials.
I would do some searching for "post-processing", which is a common term used for performing full-screen operations using fragment shaders. This is one tutorial I found very quickly through Google, although I can't verify that's it's correct or up-to-date since I'm not very familiar with OpenGL specifics.