Asymmetric border thickness on image objects

Asymmetric border thickness on image objects

Visual Studio simulator (lvgl 7.0)

What do you experience?

When I set a border width on a base obj, I get the correct border thickness on each side of the rectangle, but if I do the same on an image obj, the right and bottom borders are 1 pixel thinner than the expected value.

What do you expect?

See the image below.

Code to reproduce

	lv_obj_t* m_handle = lv_img_create(lv_scr_act(), NULL);
	lv_obj_set_size(m_handle,130, 130);
	lv_img_set_auto_size(m_handle, false);
	lv_img_set_src(m_handle, &some_image);

	lv_obj_set_style_local_border_width(m_handle, LV_IMG_PART_MAIN, LV_STATE_DEFAULT, 2);
	lv_obj_set_style_local_border_color(m_handle, LV_IMG_PART_MAIN, LV_STATE_DEFAULT, LV_COLOR_BLACK);


Screenshot and/or video

Cattura1

Hi all,

for me (lvgl version 7.0.1) this bug occurs, when macro “LV_USE_IMG_TRANSFORM” is not set to 1.

@kisvegabor I created a pull request for this - https://github.com/lvgl/lvgl/pull/1584. Please check it, when you will have a time, because I’m not sure, if it will enough.

Test succeded. Thank you.

Is it going to be integrated in v.7.0.2?

No; it will be released with 7.1 (at the beginning of July).