mirror of
https://github.com/willnorris/imageproxy.git
synced 2026-05-18 00:05:14 +02:00
Support TIFF images.
This commit is contained in:
parent
4533f0c68a
commit
c1a9dab401
3 changed files with 4 additions and 3 deletions
|
|
@ -25,6 +25,7 @@ import (
|
|||
|
||||
"github.com/disintegration/imaging"
|
||||
_ "golang.org/x/image/webp" // register webp format
|
||||
_ "golang.org/x/image/tiff" // register tiff format
|
||||
"willnorris.com/go/gifresize"
|
||||
)
|
||||
|
||||
|
|
@ -64,7 +65,7 @@ func Transform(img []byte, opt Options) ([]byte, error) {
|
|||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
case "jpeg", "webp": // default to encoding webp as jpeg
|
||||
case "jpeg", "webp", "tiff": // default to encoding webp & tiff as jpeg
|
||||
quality := opt.Quality
|
||||
if quality == 0 {
|
||||
quality = defaultQuality
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue