Image Module

Terry Hancock hancock at anansispaceworks.com
Thu Apr 14 01:24:42 EDT 2005


On Tuesday 12 April 2005 06:01 pm, Nicholas S. Graham wrote:
> I want to convert a field of 4:2:2 digital video data into a viewable 
> format (.jpg or something) using the Image module.  Any suggestions??

I'll assume that by "Image" module, you mean Python Imaging Library.

I doubt it supports your digital video format, and I'm not sure what
"4:2:2 digital video" actually is.   You clearly need to get your video
software to export data in a standard image format of some kind (there
are many choices).  If your current video software can't save a freeze
frame in a standard format, then you'll have to search for another
video package that can.  If you get desperate, you can capture it
off of the screen with Gimp, but I assume that's not acceptable for
your situation?

Once you get it, you can use Python Imaging Library to read it
and do what you want with it.  PIL is not particularly good about the
number of formats it support (it has a definite bias towards PNG format,
and it reads more formats than it can write).  You might want to try
ImageMagick, which has a much wider range of image data types that
it can read and write.  In a Python script, you can run ImageMagick
from an os.system() call or you can use one of the Python bindings for
it.
 
Cheers,
Terry

--
Terry Hancock ( hancock at anansispaceworks.com )
Anansi Spaceworks  http://www.anansispaceworks.com




More information about the Python-list mailing list