from PIL import Image, ImageDraw
from random import randint
picture = Image.new("RGB", (600, 600))
artist = ImageDraw.Draw(picture)
for i in range(100):
x1, y1 = randint(0, 600), randint(0, 600)
x2, y2 = randint(0,600), randint(0,600)
color = (randint(0, 255), randint(0, 255), randint(0, 255))
width = randint(2, 20)
artist.line([x1, y1, x2, y2], color, width)
#picture.convert("RGB")
picture.show()
i've made this program just to demonstrate my problem. The thing is that when i run this program Windows Photo Viewer opens up but theres no image just this message:
WPM can't open this picture because either the picture is deleted, or it's in a location that isnt available
Now i'm using python 2.7 and W7 and i would really apreciate help because i cannot program further because i cannot see the result