A continuation of HomeBox the inventory and organization system built for the Home User
Use CatmullRom instead of ApproxBiLinear for thumbnail generation (#964)
confiks0408b1c03b47
diff --git a/backend/internal/data/repo/repo_item_attachments.go b/backend/internal/data/repo/repo_item_attachments.goindex 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})