Lv_img_set_zoom() operation.bin file exception

I’m running littlevglV7.0 in VS2017.
I use lv_img_set_zoom() to animate the enlarged image.
Use online tools( to convert .png files to .c and .bin files. Both files can display the image normally, but only the .c file can animate the enlarged image, and the .bin file only shows a black background when scaled.

lv_anim_t a;
lv_anim_set_var(&a, animationImg);
lv_anim_set_time(&a, 300);
lv_anim_set_repeat_count(&a, 1);
lv_anim_set_exec_cb(&a, (lv_anim_exec_xcb_t)lv_img_set_zoom);
lv_anim_set_values(&a, 256, 350);

Looking forward to your answers..
Thank youvery much

That’s normal, because bin files are read line by line to save RAM and to perform zoom or rotation the whole image needs to available.

See here:

1 Like

Hello, the final conclusion is: Does the bin type picture file support zooming?

No, bin images does not support zooming.

ok, Thank you for your reply.

hello,Does jpg file support zooming? I use lv_split_jpg to open the jpg file and use the lv_img_set_zoom function to zoom. Found that only the original size of the picture can be displayed;

Answered here: How to enlarge the picture according to its length and width - #2 by kisvegabor

Thank you~~