Hmm, that’s strange. ofxiPhoneScreenGrab uses glReadPixels to grab the screen. Are you using a modified version of OF? Maybe you could post your code for others to look at?
did you try astellato’s suggestion in the second post? i’m using 007 and it works for me: the screen is grabbed and saved to the photo album. fwiw, the code from the first post did not work for me in terms of saving to the photo album; i’m guessing it is saving it elsewhere, if at all.
I’ve been battling this, too. There are a few GL functions that aren’t supported in GLES with multisampling / antialiasing, namely glReadPixels. I’ve found a couple of leads on binding an additional framebuffer without multisampling, but haven’t had any success yet only black frames.
It had been taking an image of just 1/4 of the entire screen for some reason. My quick fix was to go to the ofxiPhoneScreenGrab method and multiply the width/height ints by 2 and it seems to come out correctly now…but there must be a more elegant way to do it than messing with the core
Lines I modified in ofxiPhoneScreenGrab:
void ofxiPhoneScreenGrab(id delegate) {
CGRect rect = [[UIScreen mainScreen] bounds];
int width = rect.size.width*2; //CHA-CHA-CHA-CHANGESSS
int height = rect.size.height*2; //CHA-CHA-CHA-CHANGESSS
NSInteger myDataLength = width * height * 4;
Also, does anyone know what decides the orientation of the taken screenshot? all of mine keep being portrait but I’m trying to get them to be landscape
@Seth - right, my device does have a retina display but I don’t understand why it thinks it has a smaller window than it actually has. For my glsetup in main.mm it’s (iOsWindow,960,480,OF_FULLSCREEN) but I dont think i follow why it need to be doubled in that screengrab method