Currently, to make a polygon transparent I'm doing,
img = Image.open("")
back = Image.new('RGBA', img.size)
back.paste(img)
poly = Image.new('RGBA', (512,512))
pdraw = ImageDraw.Draw(poly)
pdraw.rectangle([(10,10),(100,100)],
fill=(255,255,255,200))
back.paste(poly, (0,0), mask=poly)
back.show()
But what I want is all the areas which is outside my polygon, to be transparent, and the area inside my polygon to be same. Basically, the reverse of what I'm doing now.