Re: [Image-SIG] Example Code for Displaying Pictures--I'm Stumped

2009-11-30 Thread Wayne Watson
I now have a detailed description of the file, but the smallest file I can find is 1.7M. I don't think I can go lower. It probably contains 90 128x128 frames plus the 640x480. I suppose if there's some tool in Win, I could just cut it at some place to shorten it. Tomorrow I'm going out of town,

Re: [Image-SIG] Example Code for Displaying Pictures--I'm Stumped

2009-11-26 Thread Wayne Watson
Thanks. I'll try to follow up on this soon. Bill Janssen wrote: Another good option is pyglet. I use it for converting video to streams of PIL images. Here's the code for turning a pyglet image into a PIL image: def pyglet_to_pil_image (pyglet_image): image = pyglet_image.get_imag

Re: [Image-SIG] Example Code for Displaying Pictures--I'm Stumped

2009-11-26 Thread Wayne Watson
Thanks. Unfortunately, the fellow that can answer my question left early yesterday, so I won't know exactly the file's structure until Monday. Christopher Barker wrote: Wayne Watson wrote: I didn't know I could post, attach I guess, here. I'll do that later. as long as it's a small file -- i

Re: [Image-SIG] Example Code for Displaying Pictures--I'm Stumped

2009-11-26 Thread Fredrik Lundh
On Thu, Nov 26, 2009 at 3:05 AM, Bill Janssen wrote: >        # Note: Don't try and use frombuffer(..); different versions of >        # PIL will orient the image differently. >        pil_image = Image.fromstring( >            format, (image.width, image.height), image.get_data(format, pitch))

Re: [Image-SIG] Example Code for Displaying Pictures--I'm Stumped

2009-11-25 Thread Bill Janssen
Another good option is pyglet. I use it for converting video to streams of PIL images. Here's the code for turning a pyglet image into a PIL image: def pyglet_to_pil_image (pyglet_image): image = pyglet_image.get_image_data() format = image.format if format != 'RGB':

Re: [Image-SIG] Example Code for Displaying Pictures--I'm Stumped

2009-11-25 Thread Christopher Barker
Wayne Watson wrote: I didn't know I could post, attach I guess, here. I'll do that later. as long as it's a small file -- it can be much easier to help There is one puzzling format difficulty I have with the file that requires some attention. I hope to have that cleared up in the next hour

Re: [Image-SIG] Example Code for Displaying Pictures--I'm Stumped

2009-11-25 Thread Wayne Watson
I didn't know I could post, attach I guess, here. I'll do that later. There is one puzzling format difficulty I have with the file that requires some attention. I hope to have that cleared up in the next hour or two. Actually, there's a twist in the format that should be mentioned. The first i

Re: [Image-SIG] Example Code for Displaying Pictures--I'm Stumped

2009-11-25 Thread Christopher Barker
Wayne Watson wrote: David, I have many video files, but only want to process them one at a time. The format is unique, but simple. Basically, 640x480 b/w bmp images one right after the other. In here: http://www.pythonware.com/library/pil/handbook/introduction.htm Under "image sequences" the

Re: [Image-SIG] Example Code for Displaying Pictures--I'm Stumped

2009-11-25 Thread Wayne Watson
David, I have many video files, but only want to process them one at a time. The format is unique, but simple. Basically, 640x480 b/w bmp images one right after the other. The program should read one image, then allow the user to produce a histogram of the image displayed. Now he moves to the n

Re: [Image-SIG] Example Code for Displaying Pictures--I'm Stumped

2009-11-25 Thread Wayne Watson
I thought I'd try executing your code under Win Python, but it objected to indentation, tabs. I tried substituting 4 blanks for them, but that didn't work out. Suggestions? David Kirtley wrote: http://www.cs.panam.edu/~dkirtley/video/ Should not need too much modification for what you want to