Open dmzkrsk opened 6 years ago
Probably related to #93
I have a 178x31 image and I want to fit it in 1000x20 box I expect that it will be shrinked down to 114x20 pixels
I apply options
{Width: 1000, Height: 20, Embed: true}
And recieve 1000x20 image (it's upscaled to 1000x174 and then cropped)
If both Width and Height are larger than my image
{Width: 1000, Height: 50, Embed: true}
I get correct 178x31 original image
Chaning math.Min to math.Max in resizer.go:456 produces correct aspect ratios and sizes, but final image get padded to requested Width/Height
math.Min
math.Max
Removing Embed and call to normalizeOperation gives me correct results
Embed
normalizeOperation
Anything wrong here?
PR sent
Probably related to #93
I have a 178x31 image and I want to fit it in 1000x20 box I expect that it will be shrinked down to 114x20 pixels
I apply options
And recieve 1000x20 image (it's upscaled to 1000x174 and then cropped)
If both Width and Height are larger than my image
I get correct 178x31 original image
Chaning
math.Min
tomath.Max
in resizer.go:456 produces correct aspect ratios and sizes, but final image get padded to requested Width/HeightRemoving
Embed
and call tonormalizeOperation
gives me correct resultsAnything wrong here?