Skip to content

Commit

Permalink
Fix Avatar Resize (resize algo NearestNeighbor -> Bilinear) (#12745)
Browse files Browse the repository at this point in the history
* Update Vendor github.com/nfnt/resize

* switch resize algo NearestNeighbor -> Bilinear
  • Loading branch information
6543 committed Sep 6, 2020
1 parent 332dbe7 commit f7b3e06
Show file tree
Hide file tree
Showing 8 changed files with 292 additions and 124 deletions.
2 changes: 1 addition & 1 deletion go.mod
Expand Up @@ -73,7 +73,7 @@ require (
github.com/minio/minio-go/v7 v7.0.4
github.com/mitchellh/go-homedir v1.1.0
github.com/msteinert/pam v0.0.0-20151204160544-02ccfbfaf0cc
github.com/nfnt/resize v0.0.0-20160724205520-891127d8d1b5
github.com/nfnt/resize v0.0.0-20180221191011-83c6a9932646
github.com/niklasfasching/go-org v1.3.2
github.com/oliamb/cutter v0.2.2
github.com/olivere/elastic/v7 v7.0.9
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Expand Up @@ -703,8 +703,8 @@ github.com/mschoch/smat v0.2.0/go.mod h1:kc9mz7DoBKqDyiRL7VZN8KvXQMWeTaVnttLRXOl
github.com/msteinert/pam v0.0.0-20151204160544-02ccfbfaf0cc h1:z1PgdCCmYYVL0BoJTUgmAq1p7ca8fzYIPsNyfsN3xAU=
github.com/msteinert/pam v0.0.0-20151204160544-02ccfbfaf0cc/go.mod h1:np1wUFZ6tyoke22qDJZY40URn9Ae51gX7ljIWXN5TJs=
github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U=
github.com/nfnt/resize v0.0.0-20160724205520-891127d8d1b5 h1:BvoENQQU+fZ9uukda/RzCAL/191HHwJA5b13R6diVlY=
github.com/nfnt/resize v0.0.0-20160724205520-891127d8d1b5/go.mod h1:jpp1/29i3P1S/RLdc7JQKbRpFeM1dOBd8T9ki5s+AY8=
github.com/nfnt/resize v0.0.0-20180221191011-83c6a9932646 h1:zYyBkD/k9seD2A7fsi6Oo2LfFZAehjjQMERAvZLEDnQ=
github.com/nfnt/resize v0.0.0-20180221191011-83c6a9932646/go.mod h1:jpp1/29i3P1S/RLdc7JQKbRpFeM1dOBd8T9ki5s+AY8=
github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e h1:fD57ERR4JtEqsWbfPhv4DMiApHyliiK5xCTNVSPiaAs=
github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno=
github.com/niklasfasching/go-org v1.3.2 h1:ZKTSd+GdJYkoZl1pBXLR/k7DRiRXnmB96TRiHmHdzwI=
Expand Down
2 changes: 1 addition & 1 deletion modules/avatar/avatar.go
Expand Up @@ -89,6 +89,6 @@ func Prepare(data []byte) (*image.Image, error) {
}
}

img = resize.Resize(AvatarSize, AvatarSize, img, resize.NearestNeighbor)
img = resize.Resize(AvatarSize, AvatarSize, img, resize.Bilinear)
return &img, nil
}
8 changes: 4 additions & 4 deletions vendor/github.com/nfnt/resize/.travis.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions vendor/github.com/nfnt/resize/README.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions vendor/github.com/nfnt/resize/resize.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit f7b3e06

Please sign in to comment.