Scale images to fit or fill

This commit is contained in:
rmn
2017-05-05 12:17:30 +03:00
parent 9fcff1bd9a
commit 366fe0d394
4 changed files with 19 additions and 10 deletions

View File

@@ -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 {