diff --git a/README.md b/README.md index 6f4f186..fc2872b 100644 --- a/README.md +++ b/README.md @@ -447,6 +447,7 @@ Crop the image by a given width or height. Image ratio is maintained - file `string` - Only GET method and if the `-mount` flag is present - url `string` - Only GET method and if the `-enable-url-source` flag is present - force `bool` +- rotate `int` - norotation `bool` - noprofile `bool` - colorspace `string` @@ -468,6 +469,7 @@ Resize an image by width or height. Image aspect ratio is maintained - file `string` - Only GET method and if the `-mount` flag is present - url `string` - Only GET method and if the `-enable-url-source` flag is present - force `bool` +- rotate `int` - norotation `bool` - noprofile `bool` - colorspace `string` @@ -486,6 +488,7 @@ Accepts: `image/*, multipart/form-data`. Content-Type: `image/*` - file `string` - Only GET method and if the `-mount` flag is present - url `string` - Only GET method and if the `-enable-url-source` flag is present - force `bool` +- rotate `int` - norotation `bool` - noprofile `bool` - colorspace `string` @@ -508,6 +511,7 @@ Accepts: `image/*, multipart/form-data`. Content-Type: `image/*` - file `string` - Only GET method and if the `-mount` flag is present - url `string` - Only GET method and if the `-enable-url-source` flag is present - force `bool` +- rotate `int` - norotation `bool` - noprofile `bool` - colorspace `string` @@ -527,6 +531,7 @@ Accepts: `image/*, multipart/form-data`. Content-Type: `image/*` - file `string` - Only GET method and if the `-mount` flag is present - url `string` - Only GET method and if the `-enable-url-source` flag is present - force `bool` +- rotate `int` - norotation `bool` - noprofile `bool` - colorspace `string` @@ -545,6 +550,7 @@ Accepts: `image/*, multipart/form-data`. Content-Type: `image/*` - file `string` - Only GET method and if the `-mount` flag is present - url `string` - Only GET method and if the `-enable-url-source` flag is present - force `bool` +- rotate `int` - norotation `bool` - noprofile `bool` - colorspace `string` @@ -616,6 +622,7 @@ Accepts: `image/*, multipart/form-data`. Content-Type: `image/*` - file `string` - Only GET method and if the `-mount` flag is present - url `string` - Only GET method and if the `-enable-url-source` flag is present - force `bool` +- rotate `int` - norotation `bool` - noprofile `bool` - colorspace `string` @@ -640,6 +647,7 @@ Accepts: `image/*, multipart/form-data`. Content-Type: `image/*` - file `string` - Only GET method and if the `-mount` flag is present - url `string` - Only GET method and if the `-enable-url-source` flag is present - force `bool` +- rotate `int` - norotation `bool` - noprofile `bool` - colorspace `string` diff --git a/controllers.go b/controllers.go index 0b2c38b..8050ab4 100644 --- a/controllers.go +++ b/controllers.go @@ -76,9 +76,9 @@ func formController(w http.ResponseWriter, r *http.Request) { method string args string }{ - {"Resize", "resize", "width=300&height=200&type=png"}, + {"Resize", "resize", "width=1000&type=jpeg"}, {"Force resize", "resize", "width=300&height=200&force=true"}, - {"Crop", "crop", "width=562&height=562&quality=95"}, + {"Crop", "crop", "width=1000&quality=95"}, {"Extract", "extract", "top=100&left=100&areawidth=300&areaheight=150"}, {"Enlarge", "enlarge", "width=1440&height=900&quality=95"}, {"Rotate", "rotate", "rotate=180"}, diff --git a/image.go b/image.go index e6a9f85..b7fe2f0 100644 --- a/image.go +++ b/image.go @@ -122,7 +122,6 @@ func Rotate(buf []byte, o ImageOptions) (Image, error) { } opts := BimgOptions(o) - opts.Rotate = bimg.Angle(o.Rotate) return Process(buf, opts) } diff --git a/options.go b/options.go index 0ec7409..0f0b53c 100644 --- a/options.go +++ b/options.go @@ -44,5 +44,6 @@ func BimgOptions(o ImageOptions) bimg.Options { Gravity: o.Gravity, Interpretation: o.Colorspace, Type: ImageType(o.Type), + Rotate: bimg.Angle(o.Rotate), } } diff --git a/version.go b/version.go index c3e9087..ec8c051 100644 --- a/version.go +++ b/version.go @@ -2,7 +2,7 @@ package main import "gopkg.in/h2non/bimg.v0" -const Version = "0.1.18" +const Version = "0.1.19" type Versions struct { ImaginaryVersion string `json:"imaginary"`