December 11, 2020, 3:22pm
Is there a way to save what is currently on the screen to a png or the like? I am sure there is (As the data has to be somewhere right?)
This would be a really cool piece of functionality
What MCU/Processor/Board and compiler are you using?
Raspberry Pi ATM, VisualGDB Visual Studio 2019
What LVGL version are you using?
What do you want to achieve?
A simple function to call to save a screen shot.
What have you tried so far?
Not quite positive where to start, other than to start digging thru the core.
Code to reproduce
Add a code snippet which can run in the simulator. It should contain only the relevant code that compiles without errors when separated from your main code base.
The code block(s) should be formatted like:
/*You code here*/
Screenshot and/or video
If possible, add screenshots and/or videos about the current state.
The trick that’s usually recommended is to divert the pixels from the display driver to a file.
Set a flag e.g.: screenshot_mode = true
The driver will get the whole frame in several chunks according to LV_VDB_SIZE. Always full lines will be sent.
If screenshot_mode == true save the parts one by one instead of sending them to the ILI9341
When y2 == LV_VER_RES set screenshot_mode = false to go back to normal mode.
December 11, 2020, 3:55pm
How difficult would it be to add something like:
I think it would be easy, except that users’ requirements are different. Some would want a raw buffer to send over the air to another device. Others wouldn’t have enough RAM for that and would want it saved to a file.
Something like this might be better implemented as an example which can be copied into a project, rather than a core function.
December 11, 2020, 4:07pm
But I do like the idea of you doing my homework FOR me