python create image shape with effects

1.1k views Asked by At

I'd like to create an image and giving it some effect so it won't get just a "flat" rectangle. A shadow or borders could be simulated by drawing other rectangles/lines, but it must be a easy and efficient way to do it!

What function/module can I use in order to add some relief on the rectangle?

from PIL import Image, ImageFont, ImageDraw

im = Image.new('RGB', (200,50), (100,100,200))
dr = ImageDraw.Draw(im)
im.save("imgRectpng")

 code Results:

Desired

0

There are 0 answers