Make sure you give it the correct size of the icon ...
from PIL import Image
import ImageDraw
im = Image.new("RGB", (500,500), "white")
draw = ImageDraw.Draw(im)
icon = Image.open("icon1.jpg")
# get the correct size
x, y = icon.size
im.paste(icon, (0,0,x,y))
del draw
im.save("test.jpg", "JPEG")
# optional, show the saved image in the default viewer (works in Windows)
import webbrowser
webbrowser.open("test.jpg")
Reputation Points: 1333
Solved Threads: 1403
DaniWeb's Hypocrite
Offline 5,792 posts
since Oct 2004