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

2010-02-11 Thread Laura Edward Cannon
Using imagechops, multipy the alpha channels. If your source image in white everywhere you could just multiply the images. Alternately you could add the mask from the one image to the other image using the addalpha method which takes a L or 1 band image as the alpha chanel) On Mon, Jan 25, 2010

[Image-SIG] BUG? PIL does not recognise alpha channel in attached png file

2010-02-11 Thread Root
Hi, The attached image shows an alpha channel when viewed with gimp or eog, but not when loading with PIL (version 1.1.6-3ubuntu1 as supplied with Ubuntu Karmic AMD64 Desktop): import Image im = Image.open(seabreeze.png) print im.format PNG print im.size (599, 264) print im.mode RGB

[Image-SIG] BUG? PIL does not recognise alpha channel in attached png file

2010-02-11 Thread Justin Smith
Hi, The attached image shows an alpha channel when viewed with gimp or eog, but not when loading with PIL (version 1.1.6-3ubuntu1 as supplied with Ubuntu Karmic AMD64 Desktop): import Image im = Image.open(seabreeze.png) print im.format PNG print im.size (599, 264) print im.mode RGB

[Image-SIG] PIL not saving metadata from progressive Jpeg's

2010-02-11 Thread Frank Borell
Hello, I've tested on PIL 1.16 and 1.17. Metadata(IPTC and EXIF) are saved fine when the jpg image is NOT progressive. But when the jpg is progressive, the metadata gets wiped out. Does anyone have any ideas on how to preserve? im = Image.open('progressive jpeg path') im.save('jpeg path') or

[Image-SIG] PIL 1.17 wiping out metadata

2010-02-11 Thread Borell, Frank
Hello, I've tested on PIL 1.16 and 1.17. Metadata(IPTC and EXIF) are saved fine when the jpg image is NOT progressive. But when the jpg is progressive, the metadata gets wiped out. Does anyone have any ideas on how to preserve? im = Image.open('progressive jpeg path') im.save('jpeg path') or

[Image-SIG] 16 bit tiff files

2010-02-11 Thread John Densmore
Hi all, I'm trying read in a 16-bit tiff image. I've googled around and it seems like PIL should be able to handle 16-bit tiffs. I receive the following error: IOError: cannot identify image file. What am I missing? Thanks ___ Image-SIG maillist

[Image-SIG] proble loading font

2010-02-11 Thread ariel goldstien
Hi. My name is Ariel Goldstien I work at The Hebrew university laboratory. I am trying to write a Hebrew string to a BMP. and I keep getting The _imaging C module is not installed despite the fact that I have managed to import _imaging. this is the code: import Image import ImageDraw import

[Image-SIG] Colorize Image

2010-02-11 Thread Espen Moe-Nilssen
Hi We are making an open source project, http://plone.org/products/subskins I have been trying over and over again to find a way to let PIL colorize an image. It should work like this: 1) I have a greyscale image 2) A color is selected, for example #123456 3) The image is colorized in this

Re: [Image-SIG] Colorize Image

2010-02-11 Thread jcupitt
On 10 February 2010 11:01, Espen Moe-Nilssen es...@medialog.no wrote: We are making an open source project, http://plone.org/products/subskins I have been trying over and over again to find a way to let PIL colorize an image. It should work like this: 1) I have a greyscale image 2) A color

Re: [Image-SIG] PIL not saving metadata from progressive Jpeg's

2010-02-11 Thread Stani
http://tilloy.net/dev/pyexiv2/index.htm On Wed, Jan 27, 2010 at 2:50 PM, Frank Borell frankbor...@gmail.com wrote: Hello, I've tested on PIL 1.16 and 1.17. Metadata(IPTC and EXIF) are saved fine when the jpg image is NOT progressive. But when the jpg is progressive, the metadata gets wiped

Re: [Image-SIG] Colorize Image

2010-02-11 Thread Stani
How about using ImageOps.colorize ;-) ? On Thu, Feb 11, 2010 at 12:50 PM, jcup...@gmail.com wrote: On 10 February 2010 11:01, Espen Moe-Nilssen es...@medialog.no wrote: We are making an open source project, http://plone.org/products/subskins I have been trying over and over again to find a

Re: [Image-SIG] Colorize Image

2010-02-11 Thread Laura Edward Cannon
There is a function for this. from the handbook: ImageOps.colorize(image, black, white) = image Colorize grayscale image. The black and white arguments should be RGB tuples or color names; this function calculates a colour wedge mapping all black pixels in the source image to the first colour,

[Image-SIG] delayed mail

2010-02-11 Thread Fredrik Lundh
sorry for the delays in mail handling; I've been on the road more or less constantly since late november, and more mails than usual have ended up in the moderation queues lately (most of it is indeed spam, but not everything...). /F ___ Image-SIG

[Image-SIG] compatibility

2010-02-11 Thread Mathews, Leah Nicole
Hello, We are currently using Python Imaging Library 1.1.6 and evaluating for use with snow leopard. Is it compatible and what is the version that is compatible? Thanks, Leah ___ Image-SIG maillist - Image-SIG@python.org

Re: [Image-SIG] Colorize Image

2010-02-11 Thread Espen Moe-Nilssen
Thanks a lot. I thought there had to be one, but I never found it. This will come in very handy Espen, There is a function for this. from the handbook: ImageOps.colorize(image, black, white) = image Colorize grayscale image. The black and white arguments should be RGB tuples or color names;

Re: [Image-SIG] delayed mail

2010-02-11 Thread Fredrik Lundh
(and of course that mail got caught by the filter as well. argh!) On Thu, Feb 11, 2010 at 9:06 PM, Fredrik Lundh fred...@pythonware.com wrote: sorry for the delays in mail handling; I've been on the road more or less constantly since late november, and more mails than usual have ended up in

Re: [Image-SIG] compatibility

2010-02-11 Thread Fredrik Lundh
On Thu, Feb 11, 2010 at 10:51 PM, Mathews, Leah Nicole mathe...@indiana.edu wrote: Hello, We are currently using Python Imaging Library 1.1.6 and evaluating for use with snow leopard. Is it compatible and what is the version that is compatible? I'm not aware of any known incompatibilities

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

2010-02-11 Thread Fredrik Lundh
2010/1/26 Веселин m...@vpetkov.com: 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 =