Re: [Image-SIG] How to "crop" along a mask?

2010-01-26 Thread Nils de Reus
What you describe is not cropping, but rather the setting of an alpha mask. Here is the simple case for if all your images are the same size as your template, and only the template has transparancy information: # Get the Alpha band from the template tmplt = Image.open('template.png') A = tmplt

[Image-SIG] How to pass the address of the buffer to Image.frombuffer()

2010-01-26 Thread Веселин
I want to display captured frames from a webcam. I am using video4linux2, v4l2 bindings for python and ctypes. I am also using Tk. In the main loop of my v4l2 app, after Q_BUF, STREAM_ON, DQ_BUF I call method that looks something like that: window = Tkinter.Tk() image = ImageTk.PhotoImage(pixelf

[Image-SIG] decoder zip not available but PIL install summary says it is

2010-01-26 Thread Erik Myllymaki
I'm trying to use PIL with a module in OpenERP but am getting the following error: File "/opt/openerp/stable/5.0/addons/report_openoffice/barcode/barcode.py", line 38, in make_barcode im = bar.getImage(code,height) File "/opt/openerp/stable/5.0/addons/report_openoffice/barcode/EANBa