The png image is not displayed

Description

Hi,I encountered a problem.After following the document operation, the png image did not appear on the screen. I would like to know which step caused the problem

What MCU/Processor/Board and compiler are you using?

Xilinx mpsoc

What LVGL version are you using?

8.3.3

What do you want to achieve?

I want the image to display normally

What have you tried so far?

I tried two methods, but still couldn’t display them,Decoding library initialized

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:

  ( Method 1) 
lv_png_init();
	FILE* pr = fopen("/sd/image/defrost.png", "rb");
	if (NULL == pr)
	{
		printf("open for reading fail\n");
	}else
    printf("open for reading ok\n");
    keyboard_img=lv_img_create(top_left_cont);
    // lv_obj_set_size(keyboard_img,650,350);
    // lv_obj_set_style_img_opa(keyboard_img,0,0);
    // lv_obj_set_style_bg_opa(keyboard_img,0,0);
    // lv_obj_set_style_bg_img_opa(keyboard_img,0,0);
    lv_obj_align(keyboard_img,LV_ALIGN_CENTER,0,200);
    // lv_obj_set_style_img_recolor_opa();
    lv_img_set_src(keyboard_img,(void *)pr);

    (Method 2)
#define LV_USE_FS_STDIO 1
#if LV_USE_FS_STDIO
    #define LV_FS_STDIO_LETTER '\'    
    #define LV_FS_STDIO_PATH "\"        
    #define LV_FS_STDIO_CACHE_SIZE 0  
#endif
lv_fs_stdio_init();
lv_png_init();
    keyboard_img=lv_img_create(top_left_cont);
    // lv_obj_set_size(keyboard_img,650,350);
    // lv_obj_set_style_img_opa(keyboard_img,0,0);
    // lv_obj_set_style_bg_opa(keyboard_img,0,0);
    // lv_obj_set_style_bg_img_opa(keyboard_img,0,0);
    lv_obj_align(keyboard_img,LV_ALIGN_CENTER,0,200);
    // lv_obj_set_style_img_recolor_opa();
    lv_img_set_src(keyboard_img,"/sd/image/defrost.png");

Screenshot and/or video

If possible, add screenshots and/or videos about the current state.
Normal

@embeddedt @kisvegabor
Can give me some advice? Thank in advance

Hi @lihuihuang ,

Please see the online documentation here there is an example given.

Kind Regards,

Pete