[Image-SIG] rotate image with transparent background?
douglas at paradise.net.nz
Thu Jan 18 02:55:08 CET 2007
> I'm trying to rotate an image and have the expanded background be transparent.
The image you get from opening a JPG won't have an alpha channel. You
need to add it yourself with the .convert() method.
This ought to work:
im = Image.open("pic1.jpg").convert('RGBA')
im2 = im.rotate(32, expand = 1)
More information about the Image-SIG