mirror of
https://github.com/openmv/openmv.git
synced 2025-11-04 14:49:50 +08:00
py_image: Fix corruption using to_ndarray() on grayscale images.
This commit is contained in:
parent
bc91292a74
commit
c02adb23cd
@ -845,7 +845,7 @@ static mp_obj_t py_image_to_ndarray(uint n_args, const mp_obj_t *pos_args, mp_ma
|
||||
|
||||
int i = 0;
|
||||
|
||||
for (; i < len; i += 4) {
|
||||
for (; i < (len - 3); i += 4) {
|
||||
*((uint32_t *) (output_u8 + i)) = *((uint32_t *) (input_u8 + i)) ^ shift;
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user