This commit is contained in:
Andrea Maria Piana 2020-12-09 17:51:32 +01:00
parent 69de77c36a
commit 618524d8cb
1 changed files with 4 additions and 0 deletions

View File

@ -6,6 +6,8 @@ import (
"github.com/nfnt/resize"
"github.com/oliamb/cutter"
"github.com/ethereum/go-ethereum/log"
)
func Resize(size ResizeDimension, img image.Image) image.Image {
@ -20,6 +22,8 @@ func Resize(size ResizeDimension, img image.Image) image.Image {
width, height = uint(size), 0
}
log.Info("resizing", "size", size, "width", width, "height", height, "img", img)
return resize.Resize(width, height, img, resize.Bilinear)
}