fix(snapshot): make snapshot work again

Support inly true color, true color alpha and a8 formats
This commit is contained in:
Gabor Kiss-Vamosi
2022-07-24 16:18:50 +02:00
parent 7823db1ded
commit cd4d07a4ba
2 changed files with 20 additions and 19 deletions

View File

@@ -8,13 +8,10 @@ Simply call API `lv_snapshot_take` to generate the image descriptor which can be
Note, only below color formats are supported for now:
- LV_IMG_CF_TRUE_COLOR
- LV_IMG_CF_TRUE_COLOR_ALPHA
- LV_IMG_CF_ALPHA_1BIT
- LV_IMG_CF_ALPHA_2BIT
- LV_IMG_CF_ALPHA_4BIT
- LV_IMG_CF_ALPHA_8BIT
### Free the Image
The memory `lv_snapshot_take` uses are dynamically allocated using `lv_mem_alloc`. Use API `lv_snapshot_free` to free the memory it takes. This will firstly free memory the image data takes, then the image descriptor.