[Image-SIG] PIL on Mac OS X 10.5

2008-08-19 Thread Fredrik Lundh
just for the archives: Matt Kangas recently posted a workaround showing how to use the pythonmac.org PIL build with the original OS X Python: http://www.p16blog.com/p16/2008/05/appengine-installing-pil-on-os-x-1053.html (not a mac user myself, so I cannot verify that this works. comments and

[Image-SIG] Writting ppm files??

2008-08-19 Thread Ashish Sethi
Hi all,. I am working with PPM/PGM/PBM file formats which have the basic format :- P2 # feep.pgm 3 3 255 0 0 0 0 0 0 0 0 0 0 0 0 9 24 15 10 27 18 0 0 0 9 24 15 10 27 18 where line1= type of file(p1=PBM,p2=PGM,p3=PPM), line2=comment, line3=dimension of the image (x and y length)

Re: [Image-SIG] Writting ppm files??

2008-08-19 Thread Fredrik Lundh
Ashish Sethi wrote: I am working with PPM/PGM/PBM file formats which have the basic format :- looks like you could save yourself a lot of time and effort by first checking if you can install: http://www.pythonware.com/products/pil/ ___ Image-SI

Re: [Image-SIG] Writting ppm files??

2008-08-19 Thread Ashish Sethi
i have...and am using it as well as u could see in my code...but the thing is PIL doesnt allows me to write image files in hybrid RGB formats like RGB 4:4:4 and 12:12:12...so i have to adopt a different approach On 8/19/08, Fredrik Lundh <[EMAIL PROTECTED]> wrote: > Ashish Sethi wrote: > > > I am

Re: [Image-SIG] Writting ppm files??

2008-08-19 Thread Fredrik Lundh
Fredrik Lundh wrote: > looks like you could save yourself a lot of time and effort by first > checking if you can install: > > http://www.pythonware.com/products/pil/ sorry, thought you'd posted this to c.l.python, and didn't see the "import" statement at first. I am working with PPM/PGM/PBM

Re: [Image-SIG] Writting ppm files??

2008-08-19 Thread Ashish Sethi
well...I tried both ur suggestions but didnt give the desired results 1. First method gave me an all black image (i.e all x/16=0) 2. This method doesnt give me an image file as an outfile Can u suggest how to work around this On 8/19/08, Fredrik Lundh <[EMAIL PROTECTED]> wrote: > Fredrik Lundh wr

[Image-SIG] problem in converting pixel data to image file

2008-08-19 Thread Ashish Sethi
Thanks for ur reply, But the thing is I was under the impression that in a ppm image the maximum or the min color value that any of the R,G and B components can take...i.e. if instead of 255 in the file below, if I give 16 then automatically it would imply my color space has changed to RGB 4:4:4 as

Re: [Image-SIG] problem in converting pixel data to image file

2008-08-19 Thread Fredrik Lundh
Ashish Sethi wrote: But the thing is I was under the impression that in a ppm image the maximum or the min color value that any of the R,G and B components can take...i.e. if instead of 255 in the file below, if I give 16 then automatically it would imply my color space has changed to RGB 4:4:4

Re: [Image-SIG] problem in converting pixel data to image file

2008-08-19 Thread Ashish Sethi
thanks for the reply, I am a noob in python and image processing and really appreciate your patience with me and sorry about the 0-16 bit crap about the garbage data...if that is binary data then shouldn't ppm(p3) image contain information in ascii (only p6 data contains binary). Does this mean pil