compute negatives
This commit is contained in:
parent
417a253ac7
commit
5e8d11d327
2
main.go
2
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")
|
||||
|
|
Loading…
Reference in New Issue