Skip to content

Commit 288921f

Browse files
author
evrenkutar
committed
apply the fix for the black line pr h2non#250 on main repo thx @lastonoga
1 parent f1ceb5f commit 288921f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

image.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ func calculateDestinationFitDimension(imageWidth, imageHeight, fitWidth, fitHeig
157157
fitHeight = int(math.Round(float64(fitWidth) * float64(imageHeight) / float64(imageWidth)))
158158
} else {
159159
// constrained by height
160-
fitWidth = int(math.Round(float64(fitHeight) * float64(imageWidth) / float64(imageHeight)))
160+
fitWidth = int(math.Ceil(float64(fitHeight) * float64(imageWidth) / float64(imageHeight)))
161161
}
162162

163163
return fitWidth, fitHeight

0 commit comments

Comments
 (0)