mirror of
https://github.com/gohugoio/hugo.git
synced 2024-12-30 19:50:46 +00:00
b718d743b7
This commit also fixes an existing test to work according to the correct logic. The test was written based on erroneous behavior. We resize the image to 300x200px, and are now trying to fit it within a 50px square. The longest edge is 300 pixels, so we need to divide it by 6 (300 / 50 == 6). And then scale the shortest edge with the same proportion (200 / 6 == 33.33). The original test was transforming the original source image, hence the previous values: 900 x 562 900 / 50 == 18 562 / 18 == 31.22 Fixes #5012 |
||
---|---|---|
.. | ||
bundler | ||
create | ||
integrity | ||
minifiers | ||
postcss | ||
templates | ||
testdata | ||
tocss/scss | ||
image.go | ||
image_cache.go | ||
image_test.go | ||
readers.go | ||
resource.go | ||
resource_cache.go | ||
resource_metadata.go | ||
resource_metadata_test.go | ||
resource_test.go | ||
smartcrop.go | ||
testhelpers_test.go | ||
transform.go | ||
transform_test.go |