does anyone know how to use libjeg from within memory in python

Stefan Behnel stefan_ml at behnel.de
Tue Oct 13 12:04:45 CEST 2009


Chris Colbert wrote:
> Say I use python to talk to a wireless webcamera that delivers images
> via http requests.
> 
> I request an image and read it into a buffer, but the image is in jpeg format.
> 
> I would like to convert this to a simple RGB format buffer to pass to
> numpy. Has anyone managed this using libjpeg or any other lib?

According to the docs, the stdlib jpeg module has been removed in Py3:

http://docs.python.org/library/jpeg.html

But since you are processing images anyway, what about using an image
processing library like PIL or ImageMagick?

Stefan



More information about the Python-list mailing list