Description
When i use lv_img_set_zoom to zoom a image without filesystem, it can work, but with filesystem , the image can not display. It is normal to not zoom the picture。
What MCU/Processor/Board and compiler are you using?
simulator
What do you expect?
Code to reproduce
lv_obj_t* img = lv_img_create(parent, NULL);
lv_img_set_src(img, "P:/flower.bin");
lv_img_set_zoom(img, 100);
Unfortunately, image transformations are not supported with images loaded from the filesystem at this time. See this post:
Unfortunately, zoom and rotate requires the whole image. The reason: imagine that lvgl draws x=10, y=20 pixel of the image. The image is rotated and zoom, so for (10;20) e.g. (87,33) should be drawn. But if only y = 20 line is available lvgl can’t get (87, 33).
A corner case is when rotate = 90° so the line becomes columns. When lvgl draws the pixels of a line (x, x+1, x+2, …) different lines will be required for each pixel (y, y+1, y+2).