commit 3b2d66cf5909f0219dea9b145c62f3fd78934bb2
parent 244b94ff0bf56c47ce08a6e08b837363040327e6
Author: n0tr1v <n0tr1v@protonmail.com>
Date: Thu, 30 Mar 2023 13:20:25 -0700
cleanup
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/lechatphp/mod.rs b/src/lechatphp/mod.rs
@@ -420,7 +420,7 @@ fn get_contour_red_pixels(top_left_pt: &Point, img: &DynamicImage) -> Vec<Point>
}
fn get_pixel_in_bound(img: &DynamicImage, x: u32, y: u32) -> Option<Rgba<u8>> {
- if x >= img.width() || y >= img.height() {
+ if !img.in_bounds(x, y) {
return None;
}
Some(img.get_pixel(x, y))