mirror of
https://github.com/willnorris/imageproxy.git
synced 2026-04-25 21:06:24 +02:00
simplify transform function to only pass bytes
This commit is contained in:
parent
b4fae2dd5f
commit
b109a87ece
2 changed files with 6 additions and 6 deletions
|
|
@ -142,7 +142,8 @@ func (p *Proxy) ServeHTTP(w http.ResponseWriter, r *http.Request) {
|
|||
return
|
||||
}
|
||||
|
||||
image, _ = transform.Transform(*image, req.Options)
|
||||
b, _ := transform.Transform(image.Bytes, req.Options)
|
||||
image.Bytes = b
|
||||
|
||||
w.Header().Add("Content-Length", strconv.Itoa(len(image.Bytes)))
|
||||
w.Header().Add("Expires", image.Expires.Format(time.RFC1123))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue