Hello Team,
I am trying to do pinch to zoom the bitmap image. While trying to zoom the image I found that image is not zooming but it is stretching and it is repeating the image content after zooming
This is the normal image:

After zooming:

Following are the properties that I have used to load the image:
<lv_obj x="5" y="69" width="504" height="446" style_bg_color="0xFFFFFF" style_border_width="2" style_border_color="0xFFFFFF" style_radius="0" scrollable="false" style_pad_all="0" gesture_bubble="false" >
<lv_obj name="image_preview" width="100%" height="100%" scrollable="false" style_pad_all="0" style_border_width="0" style_bg_opa="0">
<lv_image name="image" src="img" width="500" height="440" size_mode="real" clickable="true" style_pad_all="0" scrollable="false" gesture_bubble="true" style_clip_corner="true" floating="true" ignore_layout="true">
<event_cb callback="image_preview_cb" trigger="all" user_data=""/>
</lv_image>
</lv_obj>
<lv_label style_translate_x="21" style_translate_y="11" text="image" style_text_font="montserrat_20" style_text_color="0x0070B2"/>
</lv_obj>
And following is the code I have written for pinch to zoom:
if(pinch_scale > 0.01f) {
int32_t new_scale = static_cast<int32_t>(base_scale * pinch_scale);
if(new_scale < 128) new_scale = 128;
if(new_scale > 1024) new_scale = 1024;
current_scale = new_scale;
lv_image_set_scale(img, current_scale);
}
I know there is limitation with bitmap file BMP Decoder | LVGL Open but can we have any work around to overcome this issue. Let me know if anyone tried this thing.