All –
I was wondering if anyone knows how to capture a framebuffer to an image file. I’ve been able to do the following:
cp /dev/fb0 framebuffer.dump (on BB-xm target)
fbgrab -i -w 640 -h 480 -b 32 -f framebuffer.dump fb.png (on host)
I’ve tried lots of variations (16, 24, 32 bits/pixel and –i or no –i ) and it all results in a distorted image.
John
John Weber wrote:
All �
I was wondering if anyone knows how to capture a framebuffer to an image file. I�ve been able to do the following:
cp /dev/fb0 framebuffer.dump (on BB-xm target)
fbgrab -i -w 640 -h 480 -b 32 -f framebuffer.dump fb.png (on host)
I�ve tried lots of variations (16, 24, 32 bits/pixel and �i or no �i ) and it all results in a distorted image.
fbset should be able to tell you the current frame buffer resolution.
Also, width might not be enough, there could be a stride involved that is > width.
If the image that you see looks remotely like your content, but is distorted, I would
play with increasing width until it looks good.
Thanks Vladimir. In the end, I think it was the 32-bit pixel from the
omapfb that was messing it up. Looks like the pixel is organized RGB where R
is in bits 23 - 16, G is in bits 15-8, and B is in bits 7-0.
I was able to open the raw file in Gimp and exchange the colors that way. I
don't need to do this much, so this works for now.
John