[Image-SIG] saving an image with EXIF data

2008-02-27 Thread Eric Abrahamsen
I notice that when I open an image with PIL, manipulate it, and resave it, the EXIF data is lost. This can be a major pain, particularly with regards to image orientation -- is anyone aware of a way to feed exif data back in to the Image.save() method? Thanks! Eric __

Re: [Image-SIG] Array to Image transformations

2008-02-27 Thread Carlos da Silva Santos
There are currently two PEPs related to this kind of problem. One is lead by Travis Oliphant of numpy and is about establishing a buffer protocol for data interchange. The second one is specifically related to passing image data between applications/toolkits. http://www.python.org/dev/peps/pep-311

Re: [Image-SIG] Array to Image transformations

2008-02-27 Thread Joao S. O. Bueno
On Wednesday 27 February 2008, Frédéric Mantegazza wrote: > On mardi 26 février 2008, Joao S. O. Bueno wrote: > > On Thu 21 Feb 2008 05:47:22 Sahar Vilan wrote: > > > Can anyone help me with transformation from numpy array to > > > image (at PIL library)? > > > I want to change an array (at numpy)

Re: [Image-SIG] Array to Image transformations

2008-02-27 Thread Frédéric
Le 27/2/2008, "Carlos da Silva Santos" <[EMAIL PROTECTED]> a écrit: >There are currently two PEPs related to this kind of problem. One is >lead by Travis Oliphant of numpy and is about establishing a buffer >protocol for data interchange. The second one is specifically related >to passing image d

Re: [Image-SIG] How to convert an Image in RGB to JPG

2008-02-27 Thread Christopher Barker
Frédéric Mantegazza wrote: > On mardi 26 février 2008, Shabda Raaj wrote: >> Basically I want to create an image, do some drawing on it and get the >> image as byte array. > 'JPG" is not a valid mode exactly. Also, jpeg is NOT a byte array it's a lossy compressed format -- RGB already is a byt

Re: [Image-SIG] Array to Image transformations

2008-02-27 Thread Christopher Barker
Carlos da Silva Santos wrote: > There are currently two PEPs related to this kind of problem. One is > lead by Travis Oliphant of numpy and is about establishing a buffer > protocol for data interchange. The second one is specifically related > to passing image data between applications/toolkits. >

Re: [Image-SIG] Array to Image transformations

2008-02-27 Thread Frédéric Mantegazza
On mercredi 27 février 2008, Christopher Barker wrote: > Actually, we already have, for numpy and PIL anyway: > > > # Added “fromarray” function, which takes an object implementing the > NumPy array interface and creates a PIL Image from it. (from Travis > Oliphant). > > # Added NumPy array interf

[Image-SIG] problem with PIL's Image.save() on TIFFs

2008-02-27 Thread Guy K. Kloss
Hi, I've just had some problems with PIL's implementation of the Image.save() method when writing TIFF files. Apparently some internal tags on resolution are totally out of the normal. Using the TIFFs from libtiff later on produces some warning on a tag with bad information. This is what libti