Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from PIL import Image
- def recur(object, amt):
- total = []
- while len(total) < amt:
- for i in object:
- total.append(i)
- return total[:amt]
- b = Image.open('cover.jpg')
- ob = b.getdata()
- ob = list(ob)
- amt = len(ob)
- width, height = b.size
- total = recur(ob[:124121],amt)
- img = Image.new('RGB', (width, height), "white")
- img.putdata(total)
- img.show()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement