webp-sh / webp_server_go

Go version of WebP Server. A tool that will serve your JPG/PNG/BMP/SVGs as WebP/AVIF format with compression, on-the-fly.
https://docs.webp.sh
GNU General Public License v3.0
1.83k stars 175 forks source link

Better ReductionEffort #255

Closed n0vad3v closed 1 year ago

n0vad3v commented 1 year ago

Loop through ReductionEffort for possible fastest way to encode, as enhance to issue https://github.com/webp-sh/webp_server_go/issues/234

n0vad3v commented 1 year ago

Tested with effect as below using https://inspirehep.net/files/3ce7ad44b03d925850182b268e87487e.png as bigbig.png:

2023/07/18 23:01:01 [VIPS.info] vips__open_image_write: opening with O_TMPFILE
2023/07/18 23:01:01 [VIPS.info] vips__open_image_write: O_TMPFILE failed!
2023/07/18 23:01:01 [VIPS.info] vips__open_image_write: simple open
WARN[2023-07-18 23:01:08][244:webp_server_go/encoder.webpEncoder] Can't encode source image to WebP with default ReductionEffort 
WARN[2023-07-18 23:01:08][247:webp_server_go/encoder.webpEncoder] Retry using ReductionEffort: 1               
WARN[2023-07-18 23:01:12][247:webp_server_go/encoder.webpEncoder] Retry using ReductionEffort: 2               
INFO[2023-07-18 23:01:16][289:webp_server_go/encoder.convertLog] WebP@80%: pics/bigbig.png->exhaust/2707051faff094c4.webp 14916552->6684468 44.81% deflated 
WARN[2023-07-18 23:01:16][166:webp_server_go/helper.FindSmallestFiles] exhaust/2707051faff094c4.avif not found on filesystem 
github-actions[bot] commented 1 year ago

ghcr.io/webp-sh/webp_server_go (debian 12.0)
============================================
Total: 0 (HIGH: 0, CRITICAL: 0)
github-actions[bot] commented 1 year ago

ghcr.io/webp-sh/webp_server_go (debian 12.0)
============================================
Total: 0 (HIGH: 0, CRITICAL: 0)