Taking a screenshot of an application.
Ok, my end goal is to be able to read in the colors of every pixel in a window and process them. I know how to do this with windows, but have little idea where to get started with windows.
With windows its basically a simple process of calling "GetDIBSection" and "BitBlt" and viola, you have an array with the data for every pixel on a given window.
With X, however, the process is much more vague.
I've read up what I could, and guess that you can do something to the effect of calling XGetWindowAttributes and then accessing the pixel data directly through the Value* value; part of the attributes structure. However, I am unsure if that will even work (don't have access to linux right now).
Anyone help from someone with experience programming X would be much appreciated.