Description
I have placed an image on a canvas and now I want to zoom the image but I cannot use the lv_image_set_scale function. Is there any workaround this ?
What MCU/Processor/Board and compiler are you using?
EK-RA8D1
What LVGL version are you using?
9.2
Code to reproduce
lv_obj_t * canvas = lv_canvas_create(screen);
lv_canvas_set_buffer(canvas, cbuf, CANVAS_WIDTH, CANVAS_HEIGHT, LV_COLOR_FORMAT_ARGB8888);
lv_canvas_fill_bg(canvas, lv_color_hex3(0xFFFFFF), LV_OPA_COVER);
lv_obj_align(canvas, LV_ALIGN_DEFAULT, 0, 0);
lv_layer_t layer;
lv_canvas_init_layer(canvas, &layer);
lv_draw_image_dsc_t dsc;
lv_draw_image_dsc_init(&dsc);
dsc.src = ℑ
lv_area_t coords = { 0 , 0, image.header.w - 1,image.header.h - 1};
lv_draw_image(&layer, &dsc, &coords);
lv_canvas_finish_layer(canvas, &layer);
The code block(s) should be formatted like:
/*You code here*/
Screenshot and/or video
If possible, add screenshots and/or videos about the current state.