Add best compress level for png

This commit is contained in:
localhost_frssoft 2023-01-07 02:43:00 +03:00
parent 264931d574
commit ac99d6b3a8

View file

@ -24,7 +24,10 @@ func (t *Png) Transcode(w *proxy.ResponseWriter, r *proxy.ResponseReader, header
return err return err
} }
} else { } else {
if err = png.Encode(w, img); err != nil { enc := &png.Encoder{
CompressionLevel: png.BestCompression,
}
if err = enc.Encode(w, img); err != nil {
return err return err
} }
} }