def rotate(self, degrees):
    if (degrees == 90):
        self.image = self.image.transpose(Image.ROTATE_90)
    elif (degrees == 180):
        self.image = self.image.transpose(Image.ROTATE_180)
    elif (degrees == 270):
        self.image = self.image.transpose(Image.ROTATE_270)
    else:
        self.image = self.image.rotate(degrees, expand=1)
def rotate(self, degrees):
    if (degrees == 90):
        self.image = self.image.transpose(Image.ROTATE_90)
    elif (degrees == 180):
        self.image = self.image.transpose(Image.ROTATE_180)
    elif (degrees == 270):
        self.image = self.image.transpose(Image.ROTATE_270)
    else:
        self.image = self.image.rotate(degrees, expand=1)