From 0e2e95f0593daed8a4995a4382fcc5016d053531 Mon Sep 17 00:00:00 2001 From: "Kwabena W. Agyeman" Date: Sat, 1 Apr 2023 17:34:24 -0700 Subject: [PATCH] imlib: Fix bug with copy argument updating original object. --- src/omv/modules/py_image.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/omv/modules/py_image.c b/src/omv/modules/py_image.c index 01698ed2b..a03cd6d09 100644 --- a/src/omv/modules/py_image.c +++ b/src/omv/modules/py_image.c @@ -1001,6 +1001,9 @@ static mp_obj_t py_image_to(pixformat_t pixfmt, const uint16_t *default_color_pa if (copy_obj) { if (mp_obj_is_integer(copy_obj)) { copy = mp_obj_get_int(copy_obj); + if (copy) { + arg_other = NULL; + } } else { arg_other = py_image_cobj(copy_obj); }