Pedro Sá Couto
5 years ago
1 changed files with 0 additions and 36 deletions
@ -1,36 +0,0 @@ |
|||
from PIL import Image |
|||
import time |
|||
|
|||
i = 1 |
|||
|
|||
while True: |
|||
|
|||
page = Image.open("split/input%i.jpg"%i) |
|||
|
|||
if i % 2 == 0: |
|||
#check where the for loop is |
|||
print("trying even") |
|||
|
|||
#rotate image by 90 degrees |
|||
angle = 90 |
|||
out = page.rotate(angle, expand=True) |
|||
out.save('rotated/input%i.jpg'%i) |
|||
print('This is an even page number') |
|||
|
|||
time.sleep(2) |
|||
print("variable i: ", i) |
|||
|
|||
else: |
|||
#check where the for loop is |
|||
print("trying odd") |
|||
|
|||
#rotate image by 90 degrees |
|||
angle = 270 |
|||
out = page.rotate(angle, expand=True) |
|||
out.save('rotated/input%i.jpg'%i) |
|||
print('This is an even page number') |
|||
|
|||
time.sleep(1) |
|||
print("variable i: ", i) |
|||
|
|||
i+=1 |
Loading…
Reference in new issue