From 93088f336190078e8341a5026e2ea5826a6337db Mon Sep 17 00:00:00 2001 From: Ralph Slooten Date: Sun, 9 Nov 2025 11:33:51 +1300 Subject: [PATCH] Chore: Add type assertion for value in imaging assignment --- server/apiv1/thumbnails.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server/apiv1/thumbnails.go b/server/apiv1/thumbnails.go index af98206..6b19c57 100644 --- a/server/apiv1/thumbnails.go +++ b/server/apiv1/thumbnails.go @@ -79,9 +79,9 @@ func Thumbnail(w http.ResponseWriter, r *http.Request) { var dstImageFill *image.NRGBA if img.Bounds().Dx() < thumbWidth || img.Bounds().Dy() < thumbHeight { - dstImageFill = imaging.Fit(img, thumbWidth, thumbHeight, imaging.Lanczos) + dstImageFill = imaging.Fit(img, thumbWidth, thumbHeight, imaging.Lanczos).(*image.NRGBA) } else { - dstImageFill = imaging.Fill(img, thumbWidth, thumbHeight, imaging.Center, imaging.Lanczos) + dstImageFill = imaging.Fill(img, thumbWidth, thumbHeight, imaging.Center, imaging.Lanczos).(*image.NRGBA) } // create white image and paste image over the top // preventing black backgrounds for transparent GIF/PNG images