aboutsummaryrefslogtreecommitdiff
path: root/weed/images/preprocess.go
diff options
context:
space:
mode:
authorrmn <r.y.t@yandex.ru>2017-05-05 12:17:30 +0300
committerrmn <r.y.t@yandex.ru>2017-05-05 12:17:30 +0300
commit366fe0d394f7a0ede8cf3d7ef28e574c2f64a0b7 (patch)
treed412e8e4fcd356ede4564226673272e997f8fb87 /weed/images/preprocess.go
parent9fcff1bd9a52b76eef6e1e56d3294b7efdecc439 (diff)
downloadseaweedfs-366fe0d394f7a0ede8cf3d7ef28e574c2f64a0b7.tar.xz
seaweedfs-366fe0d394f7a0ede8cf3d7ef28e574c2f64a0b7.zip
Scale images to fit or fill
Diffstat (limited to 'weed/images/preprocess.go')
-rw-r--r--weed/images/preprocess.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/weed/images/preprocess.go b/weed/images/preprocess.go
index 968cda44f..4563df7f4 100644
--- a/weed/images/preprocess.go
+++ b/weed/images/preprocess.go
@@ -18,10 +18,10 @@ func MaybePreprocessImage(filename string, data []byte, width, height int) (resi
ext = strings.ToLower(ext)
switch ext {
case ".png", ".gif", ".webp":
- return Resized(ext, data, width, height)
+ return Resized(ext, data, width, height, "")
case ".jpg", ".jpeg":
data = FixJpgOrientation(data)
- return Resized(ext, data, width, height)
+ return Resized(ext, data, width, height, "")
}
return data, 0, 0
}