2 ms·
In the article it says you can copy `/dev/fb0` to take a screenshot. I tried this, but I don't know what format that would be to be able to display it or how to
by war1025 6y ago
In the article it says you can copy `/dev/fb0` to take a screenshot. I tried this, but I don't know what format that would be to be able to display it or how to convert it to a usable format. Any ideas?
- X-Cubed 6y agoThe format used by the framebuffer can differ based on your hardware and your display settings. You need to use a program that can load raw bitmap data, and it will need you to tell it what format the source data is in (resolution, byte order, etc). There's a good explanation of this on StackOverflow: https://stackoverflow.com/questions/1645181/taking-a-screen-shot-of-an-embedded-linux-framebuffer https://stackoverflow.com/questions/1645181/taking-a-screen-...
- Sophistifunk 6y agoIt will be raw bytes, format depending on what mode you're in. Usually 32bpp. Expect RGBA, but it might be ABGR or anything else. But you'll be able to figure it out quickly enough. Older hardware or weird modes might be more or less (16/24 bpp modes from the past, or maybe 10/10/10/2 for HDR out? I've never looked into that), but as it will be uncompressed it won't be much work to figure out.
- jwilk 6y agoIt's raw pixel data, but in general you can't just cat /dev/fb0: only part of the buffer might be be displayed on screen, and there might be colormap involved (even in 24bpp or 32bpp modes). I recommend using fbcat for taking screenshots: https://github.com/jwilk/fbcat https://github.com/jwilk/fbcat