fix crop option

This commit is contained in:
Celogeek 2023-01-14 16:36:28 +01:00
parent 0df631edad
commit 54c156625c
Signed by: celogeek
GPG Key ID: E6B7BDCFC446233A
2 changed files with 2 additions and 1 deletions

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
.vscode

View File

@ -133,7 +133,7 @@ func LoadImages(path string, options *ImageOptions) ([]*Image, error) {
panic(err)
}
if options.AutoRotate {
if options.Crop {
g := gift.New(gift.Crop(findMarging(src)))
newSrc := image.NewNRGBA(g.Bounds(src.Bounds()))
g.Draw(newSrc, src)