-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.py
More file actions
25 lines (15 loc) · 687 Bytes
/
main.py
File metadata and controls
25 lines (15 loc) · 687 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
from PIL import Image
monro = Image.open('monro.jpg')
blend_max = 0.3
red, green, blue = monro.split()
red_crop = red.crop((100,0,red.width, red.height))
red_crop_2 = red.crop((50,0,red.width-50, red.height))
new_red = Image.blend(red_crop, red_crop_2, blend_max)
blue_crop = blue.crop((0,0,blue.width-100, blue.height))
blue_crop_2 = blue.crop((50,0,blue.width-50, blue.height))
new_blue = Image.blend(blue_crop, blue_crop_2, blend_max)
green_crop = green.crop((50,0,green.width-50, green.height))
monro_blend = Image.merge ("RGB", (new_red, green_crop, new_blue))
monro_blend.save('monro_blend.jpg')
monro_blend.thumbnail((80, 80))
monro_blend.save('monro_blend_resize.jpg')