Screenshot fails from buildroot system



With Raspberry Pi2, we are using QT with eglfs support from this repository:

I am trying to take a screenshot of the current window. I followed different instructions such as:

However result from first link is not good:

Second link also fails, with a full black image. Any suggestions is appreciated.

If you want to try yourself, here is the fresh /dev/fb0 data. Please note that resolution is 720x1280:


Ok, after countless trial and errors, method below seems to work fine. Please note that i had to recompile the buildroot with ffmpeg and fbgrab functionalities.

/home/testApp -platform linuxfb


ffmpeg -vcodec rawvideo -f rawvideo -pix_fmt rgb32 -s 720x1280 -i /dev/fb0 -f 
image2 -vcodec png test%03d.png