From a0d0260f5ef0758bd805487598c27418ad2c0ca1 Mon Sep 17 00:00:00 2001 From: Will Norris Date: Sat, 7 Dec 2013 17:06:36 -0800 Subject: [PATCH] remove '=' from rotate option --- data/data.go | 4 ++-- readme.md | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/data/data.go b/data/data.go index fb6f08c..98db15e 100644 --- a/data/data.go +++ b/data/data.go @@ -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 } } diff --git a/readme.md b/readme.md index 12d6196..f7bbbb1 100644 --- a/readme.md +++ b/readme.md @@ -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)