fix(snapshot): set data_size on returned dsc (#4964)

This commit is contained in:
Niklas Fiekas
2023-12-09 19:47:08 +01:00
committed by GitHub
parent 2120422d69
commit 492721c99f
3 changed files with 13 additions and 11 deletions

View File

@@ -47,7 +47,7 @@ Use Existing Buffer
~~~~~~~~~~~~~~~~~~~
If the snapshot needs update now and then, or simply caller provides memory, use API
``lv_result_t lv_snapshot_take_to_buf(lv_obj_t * obj, lv_color_format_t cf, lv_image_dsc_t * dsc, void * buf, uint32_t buff_size);``
``lv_result_t lv_snapshot_take_to_buf(lv_obj_t * obj, lv_color_format_t cf, lv_image_dsc_t * dsc, void * buf, uint32_t buf_size);``
for this case. It's caller's responsibility to alloc/free the memory.
If snapshot is generated successfully, the image descriptor is updated