How to fade-in an image?

Description

I am trying to animate an image fading in. lv_obj_fade_in() just makes the object appear immediately with no animation at all.

Is there anything that needs to be taken care of in order to use fade-in animations? I suspect that I need to enable LV_COLOR_SCREEN_TRANSP in lv_conf.h, but that requires setting LV_COLOR_DEPTH to 32 and then RAM usage increases to a prohibitive level. I am currently using 8-bit colors for a monochrome display with 4-bit pixels.

Is there anyway in which I can make fade-in animations with 8-bit colors?

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

NXP MIMXRT1010

What LVGL version are you using?

8.1

What do you want to achieve?

Fade in an image.

What have you tried so far?

Using lv_obj_fade_in().

Code to reproduce

image = lv_img_create(lv_scr_act());
lv_img_set_src(image, &checkmark);
lv_obj_align(image, LV_ALIGN_BOTTOM_LEFT, 0, 0);
lv_obj_fade_in(image, 1000, 0);

Bumping this up. Still need help :smiley:

It’s working now. I was not using the opa parameter to calculate the new pixel in set_px_cb()