Reputation: 1
Now iam using the '/dev/graphics/fb0' to get the frame buffer and iam saving it on sd card using 'cat /dev/graphics/fb0 > /sdcard/screen.raw'.
Now i want convert that raw data into a png image and display on to the screen.is it possible to convert as a png in android code by using (NDK/SDK).
Upvotes: 0
Views: 1670
Reputation: 52313
Code to do this can be found in the Android source tree. The old screenshot tool reads from the framebuffer device and saves it to PNG.
Note this does not work on newer devices, which may use hardware composer overlays to avoid writing to a single framebuffer. On such devices you need to use the screencap tool instead.
Upvotes: 1