| Reply | « Previous Thread | Next Thread » |
|
Hi
Using the camera example for python here I added actual code to the buffer callback to actually save a picture, like so: Code:
def buffer_cb(self, element, buffer, pad):
if self.picture_taken:
self.picture_taken = False
print "picture taken"
image = Image.fromstring("P", (640,480), buffer)
image = image.convert("RGB")
image.save("picture.jpg")
return True
Thanks in advance
Last edited by phil232fm : 2008-12-11 at 21:29.
Reason: missed model in title
|
|
You may need to configure the raw decoder to match the input format (see the raw decoder documentation):
Code:
image = Image.fromstring("RGB", (640, 480), buffer, "raw", "RGB", 0)
By the way, this forum is mainly populated by people who use PyS60 (Python for S60 phones). Maemo-specific questions probably get more answers on maemo.org developer mailing list or internettablettalk.com (soon to be called talk.maemo.org) forums. |
|
Thank you, you gave me the clue.
---- Metatrader Expert ( http://iticsoftware.com ), Scalping Forex ( http://iticsoftware.com/scalping-forex.php ), Forex Trading Systems ( http://shop.profxtools.com ) |
| forexsystemprofi |
| View Public Profile |
| Find all posts by forexsystemprofi |
| Reply | « Previous Thread | Next Thread » |
| Thread Tools | Search this Thread |
|---|---|
| Rate This Thread | |
| Thread | Thread Starter | Forum | Replies | Last Post |
|---|---|---|---|---|
| Cellphones challenge cameras with sharper pictures | jennyyu | General Discussion | 0 | 2008-06-18 10:23 |
| Disable camera | Asmodeusz | Symbian Media (Graphics & Sounds) | 2 | 2008-04-30 11:02 |
| embedable camera application?? | zhengyu97 | General Symbian C++ | 0 | 2005-04-22 12:09 |
| 7710 MMAPI camera snapsot gives low res pictures | akmits | Mobile Java Media (Graphics & Sounds) | 0 | 2005-03-09 23:31 |
| Compatibility problems with camera API on 6600 | fredrik99 | General Symbian C++ | 3 | 2003-12-10 04:35 |