From 5a6ed699e805ed639a19ba9e8f1fa69ca8297d10 Mon Sep 17 00:00:00 2001 From: Tomas Aparicio Date: Wed, 8 Apr 2015 01:34:24 +0200 Subject: [PATCH] fix(rotate): max angle to 270 --- options.go | 2 +- resize.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/options.go b/options.go index ea1b3b5..e05c618 100644 --- a/options.go +++ b/options.go @@ -70,8 +70,8 @@ type Options struct { Embed bool Flip bool Flop bool - Type ImageType Rotate Angle Gravity Gravity + Type ImageType Interpolator Interpolator } diff --git a/resize.go b/resize.go index 010f7f2..934d8c9 100644 --- a/resize.go +++ b/resize.go @@ -334,5 +334,5 @@ func getAngle(angle Angle) Angle { if divisor != 0 { angle = angle - divisor } - return angle + return Angle(math.Min(float64(angle), 270)) }