0
Fork 0
mirror of https://github.com/willnorris/imageproxy.git synced 2025-02-24 23:57:46 -05:00

remove '=' from rotate option

This commit is contained in:
Will Norris 2013-12-07 17:06:36 -08:00
parent ae66dd52b7
commit a0d0260f5e
2 changed files with 4 additions and 4 deletions

View file

@ -80,8 +80,8 @@ func ParseOptions(str string) *Options {
continue
}
if len(part) > 2 && strings.HasPrefix(part, "r=") {
o.Rotate, _ = strconv.Atoi(part[2:])
if len(part) > 2 && strings.HasPrefix(part, "r") {
o.Rotate, _ = strconv.Atoi(part[1:])
continue
}
}

View file

@ -61,7 +61,7 @@ had not been specified.
#### Rotate ####
The `r={degrees}` option will rotate the image the specified number of degrees,
The `r{degrees}` option will rotate the image the specified number of degrees,
counter-clockwise. Valid degrees values are `90`, `180`, and `270`. Images
are rotated **after** being resized.
@ -96,7 +96,7 @@ x100 | 100px tall, proportional width | ![x100](https://s.wjn.me/x1
100x150 | 100 by 150 pixels, cropping as needed | ![100x150](https://s.wjn.me/100x150/https://willnorris.com/content/uploads/2013/12/small-things.jpg)
100 | 100px square, cropping as needed | ![100](https://s.wjn.me/100/https://willnorris.com/content/uploads/2013/12/small-things.jpg)
150,fit | scale to fit 150px square, no cropping | ![150,fit](https://s.wjn.me/150,fit/https://willnorris.com/content/uploads/2013/12/small-things.jpg)
100,r=90| 100px square, rotated 90 degrees | ![100,r=90](https://s.wjn.me/100,r=90/https://willnorris.com/content/uploads/2013/12/small-things.jpg)
100,r90 | 100px square, rotated 90 degrees | ![100,r90](https://s.wjn.me/100,r90/https://willnorris.com/content/uploads/2013/12/small-things.jpg)
100,fv,fh | 100px square, flipped horizontal and vertical | ![100,fv,fh](https://s.wjn.me/100,fv,fh/https://willnorris.com/content/uploads/2013/12/small-things.jpg)