Skip to content

Commit

Permalink
图片裁剪优化
Browse files Browse the repository at this point in the history
  • Loading branch information
TruthHun88 committed Apr 14, 2019
1 parent 5f1ebc1 commit c576d1b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion helper/helper.go
Original file line number Diff line number Diff line change
Expand Up @@ -799,7 +799,7 @@ func CropImage(file string, width, height int) (err error) {
ext := strings.ToLower(filepath.Ext(file))
switch ext {
case ".jpeg", ".jpg", ".png", ".gif":
img = imaging.Fill(img, width, height, imaging.Center, imaging.NearestNeighbor)
img = imaging.Fill(img, width, height, imaging.Center, imaging.CatmullRom)
default:
err = errors.New("unsupported image format")
return
Expand Down

0 comments on commit c576d1b

Please sign in to comment.