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 {