¡@

Home 

python Programming Glossary: draw.rectangle

PIL cut off letters

http://stackoverflow.com/questions/13821882/pil-cut-off-letters

'Junicode Bold.ttf' i width height font.getsize text draw.rectangle 0 start_y width height start_y outline 'blue' draw.text 0 start_y..

My own OCR-program in Python

http://stackoverflow.com/questions/1989987/my-own-ocr-program-in-python

find_regions im draw ImageDraw.Draw im for r in regions draw.rectangle r.box outline 255 0 0 del draw #im.show output file output.png..

With the Python Imaging Library (PIL), how does one compose an image with an alpha channel over another image?

http://stackoverflow.com/questions/3374878/with-the-python-imaging-library-pil-how-does-one-compose-an-image-with-an-alp

size 100 100 color 255 0 0 255 draw ImageDraw.Draw img1 draw.rectangle 33 0 66 100 fill 255 0 0 128 draw.rectangle 67 0 100 100 fill.. img1 draw.rectangle 33 0 66 100 fill 255 0 0 128 draw.rectangle 67 0 100 100 fill 255 0 0 0 img1.save ' tmp img1.png' img2 Image.new.. size 100 100 color 0 255 0 255 draw ImageDraw.Draw img2 draw.rectangle 0 33 100 66 fill 0 255 0 128 draw.rectangle 0 67 100 100 fill..

Python PIL: how to make area transparent in PNG?

http://stackoverflow.com/questions/4379978/python-pil-how-to-make-area-transparent-in-png

Image.new 'L' im.size color 255 draw ImageDraw.Draw mask draw.rectangle transparent_area fill 0 im.putalpha mask im.save ' tmp output.png'..