views:

50

answers:

1

I have an image size 400*200. I have a frame size 400* 300.

I want to put the image in the center of frame. That is my image cordinate (0,0) starts with the frame cordinates (0,50).

+2  A: 
frame= Image.new(image.mode, (400, 300))
frame.paste(image, (0, 50))

(frame.paste(image, (0, 50), image) if the image to be framed has a transparency mask you want to keep. And pass a third parameter to Image.new to set the background colour of the frame if the default isn't what you want.)

bobince