[maemo-developers] PIL and camera.py
From: D. Scott Brown d.scott.brown at gmail.comDate: Mon May 21 21:40:05 EEST 2007
- Previous message: about SoC organization reward
- Next message: gpsd header files?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
The Python Bora tutorial indicates that JPEG saving was omitted from
Elvis Pfutzenreuter's camera.py due to the absence of PIL. Thanks to
the excellent efforts of Matt Croydon and the PyMaemo team, it looks
like we now have PIL and thus JPEG support in Python 2.5.1.
In camera.py example app, here's the spot to put code for saving the
video buffer to a file:
def buffer_cb(pad, buffer):
# Here you have a chance to do something with the image buffer
return True
I can write the buffer directly to a file, and get something Photoshop
can import as 16 bit RAW, but I'm having trouble getting PIL to work
with it. I've tried lots of different arguments for
Image.frombuffer(mode, size, data, "raw", mode, 0, 1), but most of
what comes out is noise. Any suggestions?
With hopeful thanks,
Scott
- Previous message: about SoC organization reward
- Next message: gpsd header files?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
