summaryrefslogtreecommitdiff
path: root/internal/processor
diff options
from:
to:
context:
space:
mode:
authorGravatar SayaAndy <montferrat@tuta.io> 2025-07-15 18:16:12 +0700
committerGravatar SayaAndy <montferrat@tuta.io> 2025-07-15 18:21:31 +0700
commit2f03ac5ac3a68ad26efc67f78b16dddf8c53b843 (patch)
treecdd88fe4ad9c3aa210044daf41dc21a00fa87232 /internal/processor
parent2d2138383af6d28c5b947c5a6c4989afa8f7ac56 (diff)
downloadthumbnail-generator-2f03ac5ac3a68ad26efc67f78b16dddf8c53b843.tar.gz
thumbnail-generator-2f03ac5ac3a68ad26efc67f78b16dddf8c53b843.zip
feat: implement concurrency
Diffstat (limited to 'internal/processor')
-rw-r--r--internal/processor/webp.go2
1 files changed, 1 insertions, 1 deletions
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)