-
-
Couldn't load subscription status.
- Fork 888
Closed
Description
Prerequisites
- I have written a descriptive issue title
- I have verified that I am running the latest version of ImageSharp
- I have verified if the problem exist in both
DEBUGandRELEASEmode - I have searched open and closed issues to ensure it has not already been reported
Description
When resizing an image that is smaller than the target image using Mode.Min, the resulting image is padded to be square instead of keeping the size of the original image.
I really don't feel like entering any other details, because the bug seems to be caused by a simple mistake - the Size is created using sourceWidth as width and height instead of using sourceWidth and sourceHeight.
ImageSharp/src/ImageSharp/Processing/Processors/Transforms/Resize/ResizeHelper.cs
Line 299 in 87c0a66
| return (new Size(sourceWidth, sourceWidth), new Rectangle(0, 0, sourceWidth, sourceHeight)); |
Going to create a pull request.
JimBobSquarePantsJimBobSquarePants