commit cc0783e9a031727f53c165307fca4e568f17fbb4
parent d9f8ac41db83f83e493f6cd2e217d792ced37d96
Author: n0tr1v <n0tr1v@protonmail.com>
Date: Thu, 30 Mar 2023 13:54:32 -0700
cleanup
Diffstat:
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/src/lechatphp/mod.rs b/src/lechatphp/mod.rs
@@ -389,17 +389,15 @@ fn get_contour_red_pixels(top_left_pt: &Point, img: &DynamicImage) -> Vec<Point>
}
}
};
+ // process points on x axis
for x in 0..img_width {
add_px(x, 0);
add_px(x, img_height-1);
}
+ // Process points on y axis excluding the first line and last line
+ // We exclude first/last lines to avoid processing the corners twice
for y in 1..img_height-1 {
add_px(0, y);
- if img_width < img_height {
- if img_width == 150 {
- continue;
- }
- }
add_px(img_width-1, y);
}
out