From 2f03ac5ac3a68ad26efc67f78b16dddf8c53b843 Mon Sep 17 00:00:00 2001 From: SayaAndy Date: Tue, 15 Jul 2025 18:16:12 +0700 Subject: feat: implement concurrency --- internal/processor/webp.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'internal') diff --git a/internal/processor/webp.go b/internal/processor/webp.go index b5e089d..86ff567 100644 --- a/internal/processor/webp.go +++ b/internal/processor/webp.go @@ -88,7 +88,7 @@ func (p *WebpProcessor) Process(contentType string, reader io.ReadCloser, writer minCoef = yCoef } - dst := image.NewRGBA(image.Rect(0, 0, int(float64(src.Bounds().Max.X)*minCoef), int(float64(src.Bounds().Max.Y)*minCoef))) + dst := image.NewRGBA(image.Rect(0, 0, int(float64(src.Bounds().Max.X)*minCoef+0.5), int(float64(src.Bounds().Max.Y)*minCoef+0.5))) draw.CatmullRom.Scale(dst, dst.Rect, src, src.Bounds(), draw.Over, nil) return webp.Encode(writer, dst, opts) -- cgit v1.3.1+13