I need to take an image and place it onto a new, generated white background in order for it to be converted into a downloadable desktop wallpaper. So the process would go:
- Generate new, all white image with 1440×900 dimensions
- Place existing image on top, centered
- Save as single image
In PIL, I see the ImageDraw object, but nothing indicates it can draw existing image data onto another image. Suggestions or links anyone can recommend?
This can be accomplished with an Image instance’s
pastemethod:This and many other PIL tricks can be picked up at Nadia Alramli’s PIL Tutorial