python - How to rotate ellipse in PIL(Pillow) -


so want add rotated ellipse (with transparency) onto image. how can this? so:

def create_ellipse(fi):     ellipse = image.new('rgba', (4*b, b*2), (255,255,255,0))     draw_ellipse = imagedraw.draw(ellipse, "rgba")     draw = imagedraw.draw(im, 'rgba')     l in range(b, -1, -1):         colour = (red, green, blue, int(alpha/(b)))         draw_ellipse.ellipse((b*2-l*2, b-l, b*2+l*2, b+l), fill=colour)     rotated = ellipse.rotate(fi, expand=1, resample=image.bicubic)     im.paste(rotated, (x0-2*b, y0-b), rotated)     return im 

but main picture has gray background have problems opacity.


Comments

Popular posts from this blog

java - SSE Emitter : Manage timeouts and complete() -

jquery - uncaught exception: DataTables Editor - remote hosting of code not allowed -

java - How to resolve error - package com.squareup.okhttp3 doesn't exist? -