aboutsummaryrefslogtreecommitdiff
path: root/go/images/preprocess.go
diff options
context:
space:
mode:
authorChris Lu <chris.lu@gmail.com>2014-07-05 00:43:41 -0700
committerChris Lu <chris.lu@gmail.com>2014-07-05 00:43:41 -0700
commit38231b689104aa54bfab2ba74c735b6bd107b442 (patch)
tree99d785bccfa9d21b944e60e5459b157247929555 /go/images/preprocess.go
parentfd9f924ad730f94f9022ee4b7391c0e99a14a272 (diff)
downloadseaweedfs-38231b689104aa54bfab2ba74c735b6bd107b442.tar.xz
seaweedfs-38231b689104aa54bfab2ba74c735b6bd107b442.zip
return image size when client image processing
Diffstat (limited to 'go/images/preprocess.go')
-rw-r--r--go/images/preprocess.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/go/images/preprocess.go b/go/images/preprocess.go
index b5907b1b8..6b183df9f 100644
--- a/go/images/preprocess.go
+++ b/go/images/preprocess.go
@@ -12,7 +12,7 @@ import (
* Call this function on any file uploaded to weedfs
*
*/
-func MaybePreprocessImage(filename string, data []byte, width, height int) (resized []byte) {
+func MaybePreprocessImage(filename string, data []byte, width, height int) (resized []byte, w int, h int) {
ext := filepath.Ext(filename)
switch ext {
case ".png", ".gif":
@@ -21,5 +21,5 @@ func MaybePreprocessImage(filename string, data []byte, width, height int) (resi
data = FixJpgOrientation(data)
return Resized(ext, data, width, height)
}
- return data
+ return data, 0, 0
}