mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2026-11-08 04:57:50 +01:00
Scale images to fit or fill
This commit is contained in:
1 parent
9fcff1bd9a
commit
366fe0d394
4 files changed
+19
-10
No files matched your search
@@ -144,7 +144,7 @@ func (vs *VolumeServer) GetOrHeadHandler(w http.ResponseWriter, r *http.Request)
|
||||
if r.FormValue("height") != "" {
|
||||
height, _ = strconv.Atoi(r.FormValue("height"))
|
||||
}
|
||||
n.Data, _, _ = images.Resized(ext, n.Data, width, height)
|
||||
n.Data, _, _ = images.Resized(ext, n.Data, width, height, r.FormValue("mode"))
|
||||
}
|
||||
|
||||
if e := writeResponseContent(filename, mtype, bytes.NewReader(n.Data), w, r); e != nil {
|
||||
|
||||
Reference in new issue
Block a user