Screenshot Problem [LibGDX]

I followed the instructions given here: https://github.com/libgdx/libgdx/wiki/Take-a-Screenshot

But, my saved screenshot is just a black screen; Nothing else;

Help me! :smiley:

Which part of it are you having problems with? Is the screen frame buffer black or are you having problems saving pixels to a file?

The saved screenshot is just black nothing else.

http://s24.postimg.org/t54soyqdh/Screenshot_Problem.png

Did you try writing only white pixels to the image to see if its the image output problem or screen frame buffer problem?

I have a hunch that the problem lies in the photo viewer that your are using, since the file size is not 0, so it must contain the right data. Try viewing the screenshot in another photo viewer maybe?

Why don’t you at least post your exact code so we can verify it. It works fine for me.