From 73b80a66bca7199e4f6fce3d37c0d645c793a2df Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mike=20Schw=C3=B6rer?= Date: Mon, 20 May 2024 00:20:31 +0200 Subject: [PATCH] v0.0.459 --- goextVersion.go | 4 ++-- imageext/image.go | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/goextVersion.go b/goextVersion.go index 22513c9..7117554 100644 --- a/goextVersion.go +++ b/goextVersion.go @@ -1,5 +1,5 @@ package goext -const GoextVersion = "0.0.458" +const GoextVersion = "0.0.459" -const GoextVersionTimestamp = "2024-05-20T00:15:24+0200" +const GoextVersionTimestamp = "2024-05-20T00:20:31+0200" diff --git a/imageext/image.go b/imageext/image.go index 17c3880..171b708 100644 --- a/imageext/image.go +++ b/imageext/image.go @@ -254,7 +254,7 @@ func ObjectFitImage(img image.Image, bbw float64, bbh float64, fit ImageFit, fil } else if fit == ImageFitContainTopLeft { destBounds = image.Rect(0, 0, dw, dh) } else if fit == ImageFitContainTopRight { - destBounds = image.Rect(ow-dw, 0, dw, dh) + destBounds = image.Rect(ow-dw, 0, ow, dh) } else if fit == ImageFitContainBottomLeft { destBounds = image.Rect(0, oh-dh, dw, oh) } else if fit == ImageFitContainBottomRight {