Return the same image when rotation degrees are 0.

This commit is contained in:
Roberto Rosario
2016-11-08 17:47:51 -04:00
parent e4a4e6b0c8
commit 98327ae877

View File

@@ -296,6 +296,12 @@ class TransformationRotate(BaseTransformation):
def execute_on(self, *args, **kwargs):
super(TransformationRotate, self).execute_on(*args, **kwargs)
self.degrees %= 360
if self.degress == 0:
return self.image
return self.image.rotate(
360 - self.degrees, resample=Image.BICUBIC, expand=True
)