mirror of
https://github.com/willnorris/imageproxy.git
synced 2026-04-26 05:16:25 +02:00
add svg output support, but only with primitive
This commit is contained in:
parent
b951a9ccc3
commit
a1e81bb21f
3 changed files with 17 additions and 2 deletions
5
data.go
5
data.go
|
|
@ -19,6 +19,7 @@ const (
|
|||
optFlipHorizontal = "fh"
|
||||
optFormatJPEG = "jpeg"
|
||||
optFormatPNG = "png"
|
||||
optFormatSVG = "svg"
|
||||
optFormatTIFF = "tiff"
|
||||
optPrimitivePrefix = "p"
|
||||
optRotatePrefix = "r"
|
||||
|
|
@ -70,7 +71,7 @@ type Options struct {
|
|||
// will always be overwritten by the value of Proxy.ScaleUp.
|
||||
ScaleUp bool
|
||||
|
||||
// Desired image format. Valid values are "jpeg", "png", "tiff".
|
||||
// Desired image format. Valid values are "jpeg", "png", "svg", "tiff".
|
||||
Format string
|
||||
|
||||
// Crop rectangle params
|
||||
|
|
@ -256,7 +257,7 @@ func ParseOptions(str string) Options {
|
|||
options.FlipHorizontal = true
|
||||
case opt == optScaleUp: // this option is intentionally not documented above
|
||||
options.ScaleUp = true
|
||||
case opt == optFormatJPEG, opt == optFormatPNG, opt == optFormatTIFF:
|
||||
case opt == optFormatJPEG, opt == optFormatPNG, opt == optFormatSVG, opt == optFormatTIFF:
|
||||
options.Format = opt
|
||||
case opt == optSmartCrop:
|
||||
options.SmartCrop = true
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue