I have a problem with the grabScreen function. It seems that the function works correctly to copy a part of the screen, but most of the time, it returns only a black screenshot. I use the function ofSetBackgroundAuto(false), but it doesn’t works. I don’t know what happens.
Any ideas about what can cause this bug? I will read all your suggestions
struct infos
{
bool partial = false;
int stX = 0;
int stY = 0;
int width = 0; //Changing in the code with position of the mouse
int height = 0; //Changing in the code with position of the mouse
string name = " ";
string ext = “jpg”;
ImageType type = NORMAL_TYPE;
};
Sorry, I meant when, not how. If you are calling before drawing anything, you will only get the background. Like I said before, it you be easier if you share the minimum code to reproduce the issue. That means how you are doing the setup, update and draw.
Also, and although you are not using it, is NORMAL_TYPE an enum you made? If not, is not an ofImageType enum.