Re: Image orientation and color information with PIL?

2005-07-20 Thread tvmaly
Jeff, this was exactly what I was looking for. I wrote a script with this code and it worked perfectly. Thanks Ty -- http://mail.python.org/mailman/listinfo/python-list

Re: Image orientation and color information with PIL?

2005-07-18 Thread Jeff Epler
On Mon, Jul 18, 2005 at 10:55:42AM -0600, Ivan Van Laningham wrote: > How are you going to determine the orientation of an image without > sophisticated image analysis? There is research on automatic image > orientation detection. [...] > If you write it I'll use it;-) There's research going on in

Re: Image orientation and color information with PIL?

2005-07-18 Thread Simon Dahlbacka
if you mean that you want to figure out which way the image is depending on the actual data in the image, then you'll most likely get to do the image processing yourself, on the other hand, if you are talking jpegs from a relatively new camera then I suppose that you should be able to get that info

Re: Image orientation and color information with PIL?

2005-07-18 Thread Jeff Epler
>>> i = Image.open("blue.jpg") >>> i.size (3008, 2000) >>> i.mode 'RGB' 'RGB' is the value for color jpeg images. I believe that for black&white images, i.mode is 'L' (luminosity). If you want to determine whether an existing image is landscape or portrait, then just compare i.size[0] (width) an

Re: Image orientation and color information with PIL?

2005-07-18 Thread Ivan Van Laningham
Hi All-- [EMAIL PROTECTED] wrote: > > Does anyone know if it is possible to determine if an image is > horizontal/vertical and color or black & white using the python image > library? I have been searching this news group and the information was > not all clear on this. > How are you going to

Image orientation and color information with PIL?

2005-07-18 Thread tvmaly
Does anyone know if it is possible to determine if an image is horizontal/vertical and color or black & white using the python image library? I have been searching this news group and the information was not all clear on this. Best Regards Ty -- http://mail.python.org