ImageIO Fix update JPEG buffer after loading frame.

This commit is contained in:
iabdalkader 2021-04-24 01:05:13 +02:00
parent 06d7e223be
commit b67900c80e

View File

@ -155,10 +155,6 @@ mp_obj_t py_imageio_read(uint n_args, const mp_obj_t *args, mp_map_t *kw_args)
}
}
if (copy_to_fb) {
framebuffer_update_jpeg_buffer();
}
if (0) {
#if defined(IMLIB_ENABLE_IMAGE_FILE_IO)
} else if (stream->type == IMAGE_IO_FILE_STREAM) {
@ -255,6 +251,10 @@ mp_obj_t py_imageio_read(uint n_args, const mp_obj_t *args, mp_map_t *kw_args)
mp_raise_msg(&mp_type_OSError, MP_ERROR_TEXT("Invalid image stream"));
}
if (copy_to_fb) {
framebuffer_update_jpeg_buffer();
}
return py_image_from_struct(&image);
}
STATIC MP_DEFINE_CONST_FUN_OBJ_KW(py_imageio_read_obj, 1, py_imageio_read);