From 5e8d11d327562dca6944caa6b144b961ea12862f Mon Sep 17 00:00:00 2001 From: Your Name Date: Wed, 2 Feb 2022 11:05:46 -0500 Subject: [PATCH] compute negatives --- main.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.go b/main.go index dcda30f..91e4e4b 100644 --- a/main.go +++ b/main.go @@ -132,7 +132,7 @@ func doSingleImage(f string, c config, s stats) stats { s.StartingBytes += uint64(st.Size()) decrease:=st.Size() - stt.Size() diff := ((float64(decrease) / float64(st.Size())) * 100) - if uint(diff) > c.Diff { + if diff > float64(c.Diff) { // Would replace if c.Replace { err = os.Rename(f, "imageoptimizer.replacetmp")