mirror of
https://github.com/lvgl/lvgl.git
synced 2026-05-24 08:16:29 +08:00
feat(image_decoder): add stride warning (#5471)
Signed-off-by: pengyiqiang <pengyiqiang@xiaomi.com> Co-authored-by: pengyiqiang <pengyiqiang@xiaomi.com>
This commit is contained in:
@@ -336,7 +336,10 @@ static lv_image_decoder_t * image_decoder_get_info(const void * src, lv_image_he
|
||||
if(decoder->info_cb && decoder->open_cb) {
|
||||
lv_result_t res = decoder->info_cb(decoder, src, header);
|
||||
if(res == LV_RESULT_OK) {
|
||||
if(header->stride == 0) header->stride = img_width_to_stride(header);
|
||||
if(header->stride == 0) {
|
||||
LV_LOG_INFO("Image decoder didn't set stride. Calculate it from width.");
|
||||
header->stride = img_width_to_stride(header);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user