Both grabScreen() and saveViewport() resolution issue on windows

I’m working on an application written under linux, that will be in production under windows.

Note that the windows machine as a GeForce GTX 1080, with a screen resolution set at 1920X1200.

At a moment, I export the image generated by my app (in a window of 4096X4096px) with :

fft->before.grabScreen(0, 0 , 4096,4096);  
//then (...)

Under linux, the result is good (see attached file) Good export from linux

but on windows, the result is a picture in picture bad, but with a global resolution of 4096X4096, that is ~ok. win bad grabScreen

I try an alternative with


Under linux, the result is the same (good)

but on windows, the result is a picture with a resolution near but not egal with the screen resolution : Windows saveViewport
This image as a resolution near the screen resolution but not egal (!)

Anybody knows how to solve this ?


If I need to save an image, I like to generate an ofImage from an ofFbo. I render into an ofFbo each cycle in ofApp::update(), and draw it (if relevant) in ofApp::draw(). This way the image can be any size, or resized, and the ofTexture in the ofFbo should work the same way regardless of system or hardware, at least for more common formats like GL_RGB or GL_RGBA. There could be some nuances to address; the raspberry pi for instance might have a max size of 4096 x 4096. But overall this approach has worked well for me.