Exemple #1
0
 def rotate(image: ImageData):
     if image.dimensions.rotation == 90:
         image.data = image.data.transpose(Image.ROTATE_90)
     if image.dimensions.rotation == 180:
         image.data = image.data.transpose(Image.ROTATE_180)
     if image.dimensions.rotation == 270:
         image.data = image.data.transpose(Image.ROTATE_270)
Exemple #2
0
 def __draw_layer__(image: ImageData, layer: ImageType):
     image.data = Image.alpha_composite(image.data, layer)