im = src_im.convert('RGBA')
rot = im.rotate(angle, expand=1).resize(size)
dst_im.paste(rot, (50, 50), rot)
dst_im.save('test.png')
How to use  PIL (Python Image Library)  rotate image and let black background to be transparency