compute negatives

This commit is contained in:
Your Name 2022-02-02 11:05:46 -05:00
parent 417a253ac7
commit 5e8d11d327
1 changed files with 1 additions and 1 deletions

View File

@ -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")