From 8b5c87c6d4e9ed8e220a4f8732c0cd48e92c7a09 Mon Sep 17 00:00:00 2001 From: Nick White Date: Wed, 23 Oct 2019 10:29:29 +0100 Subject: Make bucket-lines and related packages more robust bucket-lines would crash for any line that didn't have a corresponding image. Lines which weren't grayscale would also cause crashes; now they are just converted to grayscale if necessary. As a bonus, lines in jpeg can also be decoded successfull. --- bucket-lines/main.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'bucket-lines') diff --git a/bucket-lines/main.go b/bucket-lines/main.go index 6ae506a..af81b44 100644 --- a/bucket-lines/main.go +++ b/bucket-lines/main.go @@ -74,7 +74,9 @@ func main() { } for _, l := range newlines { - lines = append(lines, l) + if l.Img != nil { + lines = append(lines, l) + } } } -- cgit v1.2.1-24-ge1ad