Skip to content

Commit 4d2e9bf

Browse files
author
kavos
committed
fix: use original image bounds
1 parent f05ee11 commit 4d2e9bf

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

router/files.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ func PostFile(c echo.Context) error {
5252
draw.Draw(newImg, newImg.Bounds(), &image.Uniform{color.White}, image.Point{}, draw.Src)
5353
draw.Draw(newImg, newImg.Bounds(), orig, orig.Bounds().Min, draw.Over)
5454
b := &bytes.Buffer{}
55-
err = imaging.Encode(b, imaging.Fit(newImg, 360, 480, imaging.Linear), imaging.JPEG, imaging.JPEGQuality(85))
55+
err = imaging.Encode(b, newImg, imaging.JPEG, imaging.JPEGQuality(85))
5656
if err != nil {
5757
return internalServerError(c, err)
5858
}

0 commit comments

Comments
 (0)