[Image-SIG] using PIL's split command with color jpg file .. help for color jpg file

Edward Cannon edward at unicornschool.org
Sat Dec 22 01:11:41 CET 2012


r,g,b = im.split()
as far as I recall, then each of r,g,b is a grayscale image that is
the data that was in the channel.

On Wed, Nov 14, 2012 at 10:03 AM,  <jasonzz at earthlink.net> wrote:
> I'm using python 2.7 with PIL 1.1.7.
>
> I figure out how to work with black and white .jpg files.
>
> I ended up writing a bunch of programs to do some very interesting/cool image process effects as to learn more about image process.
> I own a small number of books on the topic of image process and have done some imagine programming in PASCAL and C
> in the past too.
>
> I'm using PIL software to read in the .jpg files & simple functions and then writing my own image processing functions/programs
> as learning process for developing my skills for work.  I have used some of PIL's image process routines provided as well.
>
> I'm now wanting to be able to do the same thing with color jpg files.
>
> But I'm running into problems using the split function. The program quits on the command line
> having to do with split function and the error is about no bands defined.
>
> Can some body please provided a simple working program that show uses the split function
> as to access the 3 colors of a .jpg file.  I have looked at the PIL hand book but the information
> appears to be incomplete at this time for using split function.
>
> I get much mileage out of studying a good sample but simple program that shows the interaction of the functions
> required to do a given task and/or process.
>
> I notice the PIL web site appears to provide NO sample programs to study and play with at this time.
>
> I'll be game to provide some of the programs that I came up working with BW .jpg files.
>
> Thanks
>
> Jason
>
>
>
> _______________________________________________
> Image-SIG maillist  -  Image-SIG at python.org
> http://mail.python.org/mailman/listinfo/image-sig


More information about the Image-SIG mailing list