From 72828cfade32177c22f1d6e343ba42e0438b7fd8 Mon Sep 17 00:00:00 2001 From: Nick White Date: Fri, 6 Nov 2020 16:44:54 +0000 Subject: Add git clone advice to readme --- README | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/README b/README index 8938e43..68b4320 100644 --- a/README +++ b/README @@ -10,6 +10,11 @@ by running `go get rescribe.xyz/preproc/...` and documentation can be read with the `go doc` command or online at . +If you just want to install and use the commands, you can get the +package with `git clone https://git.rescribe.xyz/preproc`, and then +install them with `go install ./...` from within the `preproc` +directory. + ## Commands There are several commands in the cmd/ directory which are useful -- cgit v1.2.1-24-ge1ad From b992e8482c6302af8e804c1b065ba8b8016561bb Mon Sep 17 00:00:00 2001 From: Nick White Date: Mon, 14 Dec 2020 11:11:27 +0000 Subject: Fix panic if no good edge is found in wiper If findbestedge() found no good edges at all (which is rare but can happen), then it would panic. --- wipesides.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/wipesides.go b/wipesides.go index 9183479..b9f5e5c 100644 --- a/wipesides.go +++ b/wipesides.go @@ -55,6 +55,9 @@ func findbestedge(img SummableImage, x int, w int) int { bestxs = append(bestxs, x) } } + if len(bestxs) == 0 { + return 0 + } middlex := bestxs[len(bestxs)/2] return middlex -- cgit v1.2.1-24-ge1ad