jiamin
March 31, 2021, 9:05am
#1
Description
i convert my image to c file,please give some guidance to display image c file.
What MCU/Processor/Board and compiler are you using?
What LVGL version are you using?
7.10.0
What do you want to achieve?
What have you tried so far?
Code to reproduce
The code block(s) should be formatted like:
const lv_img_dsc_t lv_logo_payment = {
.header.always_zero = 0,
.header.w = 80,
.header.h = 80,
.data_size = 6400 * LV_COLOR_SIZE / 8,
.header.cf = LV_IMG_CF_TRUE_COLOR,
.data = lv_logo_payment_map,
};
lv_obj_t* icon = lv_img_create(lv_scr_act(), NULL);
/*From variable*/
lv_img_set_src(icon, &lv_logo_payment);
Screenshot and/or video
jhonyi
March 31, 2021, 9:09am
#2
I’m new to LVGL too, havn’t use images yet . Maybe you expected too much from me.
jhonyi
March 31, 2021, 9:12am
#3
As general guidance, try to find some help from the examples’ source code, even dig deep to the widgets source code. It’s not as hard as you think it would be.
jhonyi
March 31, 2021, 9:14am
#4
Another suggestion is to read the online documents first. It’ll not cosume as much time as you think.
almir
April 1, 2021, 11:58am
#5
I suggest that you first download simulator and run the examples. Then try your code in one of those examples. I can’t give you a link but to start google “lvgl simulator on pc”.
jiamin
April 2, 2021, 2:39am
#6
i display image by c file now.
jiamin
April 2, 2021, 3:38am
#7
i want to create a dynamic menu,would you give some guidance?