Merge pull request #517 from ddech/master

fixed missing break statement in py_net_search.
This commit is contained in:
Ibrahim Abd Elkader 2019-04-28 15:39:57 +02:00 committed by GitHub
commit 6b644abdb6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -206,16 +206,19 @@ STATIC mp_obj_t py_net_search(uint n_args, const mp_obj_t *args, mp_map_t *kw_ar
int pixel = COLOR_BINARY_TO_GRAYSCALE(IMAGE_GET_BINARY_PIXEL(arg_img, a, b));
sum += pixel;
sum_2 += pixel * pixel;
break;
}
case IMAGE_BPP_GRAYSCALE: {
int pixel = IMAGE_GET_GRAYSCALE_PIXEL(arg_img, a, b);
sum += pixel;
sum_2 += pixel * pixel;
break;
}
case IMAGE_BPP_RGB565: {
int pixel = COLOR_RGB565_TO_GRAYSCALE(IMAGE_GET_RGB565_PIXEL(arg_img, a, b));
sum += pixel;
sum_2 += pixel * pixel;
break;
}
}
}