Issue 288: How to capture a frame and save it in a jpg file
Status:  Done
Owner:
Closed:  Jul 2010
Reported by sth20012...@gmail.com, Jul 22, 2010
I want to start a camera to capture a frame as needed, with the frame being saved in a JPG file while displaying on the MTScatterImage widget.
I have tried but failed. Can you give me some advices and helps? Thanks a lot!

Jul 22, 2010
Project Member #1 txprog
Not sure the needs, but if you want to display the camera on a scatter, you can do:

scatter = MTScatter()
camera = MTContainer(Camera())
scatter.add_widget(camera)
container.connect('on_resize', scatter, 'size')
getWindow().add_widget(scatter)
Jul 22, 2010
Project Member #2 txprog
If you really want to save on jpeg, tell me :)
Jul 22, 2010
#3 sth20012...@gmail.com
Thanks:)
I really want to save on jpeg,so everyone can take a photo with our touch wall and we also can collect these photos as commemoration。

Jul 23, 2010
Project Member #4 txprog
I've made a little test with Image(). The texture is accessible through image.texture.
It's exactly the same for Camera(), texture is accessible through .texture. But care, on camera, texture is not ready at the start, you must check if it's exist or not.

Anyway, here is a snippet that take a texture, and save to a file :
http://pymt.eu/wiki/Snippets/SaveATextureToAFile
Status: Done
Jul 23, 2010
#5 sth20012...@gmail.com
Thanks,I will try ~