Hi,
I'm working on a project and need to tag photos on a N97 using Python.
I found out how to tag JPEG-photos using Exif and to take photos in RGB-format.
The problem is that I can't tag RGB-photos with Exif-information. So I want to take photos in JPEG-format.
I've been searching all over the web but can't find a working example of how to do it.
I found this:
Unfortunately the file I get as result can't be read on either my computer or on the phone. It doesn't seem to contain a JPEG-photo.Code:import appuifw, e32 #Switch to landscape mode appuifw.app.orientation = "landscape" import camera app_lock = e32.Ao_lock() def quit(): #Release the camera so that other programs can use it camera.release() app_lock.signal() appuifw.app.exit_key_handler = quit #Function for taking the picture def take_picture(): #Take the photo photo = camera.take_photo('JPEG_Exif', (2592, 1944)) #Save it f = open(savepath, "w") f.write(photo) f.close() savepath = u"C:\\DATA\\photo.jpg" #This is the path and name for storing the photo appuifw.app.body = appuifw.Canvas() appuifw.app.menu=[(u"Take photo", take_picture)] app_lock.wait()
Please help me. How to take a JPEG-photo using Python on N97
Thanks.
Jonas

Reply With Quote


