diff options
Diffstat (limited to 'weed/images')
| -rw-r--r-- | weed/images/preprocess.go | 2 | ||||
| -rw-r--r-- | weed/images/resizing.go | 3 |
2 files changed, 1 insertions, 4 deletions
diff --git a/weed/images/preprocess.go b/weed/images/preprocess.go index 4563df7f4..56f14eaa4 100644 --- a/weed/images/preprocess.go +++ b/weed/images/preprocess.go @@ -17,7 +17,7 @@ func MaybePreprocessImage(filename string, data []byte, width, height int) (resi ext := filepath.Ext(filename) ext = strings.ToLower(ext) switch ext { - case ".png", ".gif", ".webp": + case ".png", ".gif": return Resized(ext, data, width, height, "") case ".jpg", ".jpeg": data = FixJpgOrientation(data) diff --git a/weed/images/resizing.go b/weed/images/resizing.go index 5af8e45c9..0ea6b1777 100644 --- a/weed/images/resizing.go +++ b/weed/images/resizing.go @@ -6,7 +6,6 @@ import ( "image/gif" "image/jpeg" "image/png" - "github.com/chai2010/webp" "github.com/chrislusf/seaweedfs/weed/glog" "github.com/disintegration/imaging" @@ -45,8 +44,6 @@ func Resized(ext string, data []byte, width, height int, mode string) (resized [ jpeg.Encode(&buf, dstImage, nil) case ".gif": gif.Encode(&buf, dstImage, nil) - case ".webp": - webp.Encode(&buf, dstImage, &webp.Options{Quality: 70}) } return buf.Bytes(), dstImage.Bounds().Dx(), dstImage.Bounds().Dy() } else { |
