From 0408b1c03b4740fd1de0c6f65012c1a8f9acb29f Mon Sep 17 00:00:00 2001 From: confiks Date: Fri, 5 Sep 2025 17:19:46 +0200 Subject: [PATCH] Use CatmullRom instead of ApproxBiLinear for thumbnail generation (#964) --- backend/internal/data/repo/repo_item_attachments.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/internal/data/repo/repo_item_attachments.go b/backend/internal/data/repo/repo_item_attachments.go index 554baee4..eb6f8391 100644 --- a/backend/internal/data/repo/repo_item_attachments.go +++ b/backend/internal/data/repo/repo_item_attachments.go @@ -851,7 +851,7 @@ func (r *AttachmentRepo) processThumbnailFromImage(ctx context.Context, groupId } newWidth, newHeight := calculateThumbnailDimensions(bounds.Dx(), bounds.Dy(), r.thumbnail.Width, r.thumbnail.Height) dst := image.NewRGBA(image.Rect(0, 0, newWidth, newHeight)) - draw.ApproxBiLinear.Scale(dst, dst.Rect, img, img.Bounds(), draw.Over, nil) + draw.CatmullRom.Scale(dst, dst.Rect, img, img.Bounds(), draw.Over, nil) buf := new(bytes.Buffer) err := webp.Encode(buf, dst, webp.Options{Quality: 80, Lossless: false})