From 2ce9291d0074acd1c566ca75ac49d5c60b2e428b Mon Sep 17 00:00:00 2001 From: Florent Messa Date: Fri, 8 Mar 2024 09:54:57 +0100 Subject: [PATCH] chore: remove deprecated image.ZP --- engine/backend/goimage.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/engine/backend/goimage.go b/engine/backend/goimage.go index a6f3d09f..dba08d9d 100644 --- a/engine/backend/goimage.go +++ b/engine/backend/goimage.go @@ -4,8 +4,6 @@ import ( "bytes" "context" "fmt" - "github.com/thoas/go-funk" - "github.com/thoas/picfit/constants" "image" "image/color/palette" "image/draw" @@ -15,6 +13,9 @@ import ( "io" "math" + "github.com/thoas/go-funk" + "github.com/thoas/picfit/constants" + "github.com/go-spectest/imaging" imagefile "github.com/thoas/picfit/image" @@ -233,7 +234,7 @@ func scale(img image.Image, options *Options, trans transformation) image.Image func imageToPaletted(img image.Image) *image.Paletted { b := img.Bounds() pm := image.NewPaletted(b, palette.Plan9) - draw.FloydSteinberg.Draw(pm, b, img, image.ZP) + draw.FloydSteinberg.Draw(pm, b, img, image.Point{}) return pm }