diff options
| author | 2025-07-15 18:16:12 +0700 | |
|---|---|---|
| committer | 2025-07-15 18:21:31 +0700 | |
| commit | 2f03ac5ac3a68ad26efc67f78b16dddf8c53b843 (patch) | |
| tree | cdd88fe4ad9c3aa210044daf41dc21a00fa87232 /internal | |
| parent | 2d2138383af6d28c5b947c5a6c4989afa8f7ac56 (diff) | |
| download | thumbnail-generator-2f03ac5ac3a68ad26efc67f78b16dddf8c53b843.tar.gz thumbnail-generator-2f03ac5ac3a68ad26efc67f78b16dddf8c53b843.zip | |
feat: implement concurrency
Diffstat (limited to 'internal')
| -rw-r--r-- | internal/processor/webp.go | 2 |
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) |