| Reply | « Previous Thread | Next Thread » |
|
Can I take a photo (with N95) and add some metadata to the same file?
|
| DrivingMobileInnovation |
| View Public Profile |
| Find all posts by DrivingMobileInnovation |
|
Quote:
Yes, using Python for S60 you can take a photo with N95. What kind of metadata do you want to add to the file ? ![]() If it the data like date / time or any other text data then you could have them as the filename of the clicked photo. This way you will have both in one file. Best Regards Croozeus |
|
Quote:
|
|
Great! Thanks a lot.
|
| DrivingMobileInnovation |
| View Public Profile |
| Find all posts by DrivingMobileInnovation |
|
Should I copy that pexif.py file to my phone \sys\bin folder?
Or how can I import it to my application?
Last edited by DrivingMobileInnovation : 2008-04-04 at 22:54.
|
| DrivingMobileInnovation |
| View Public Profile |
| Find all posts by DrivingMobileInnovation |
|
I mean how I can install that pexif to my phone? I know this is a stupid question but I don't get it work.
Ok, no it works. Correct folder is E:\\python\\lib
Last edited by DrivingMobileInnovation : 2008-04-09 at 21:30.
|
| DrivingMobileInnovation |
| View Public Profile |
| Find all posts by DrivingMobileInnovation |
|
Join Date: Feb 2008
Posts: 2,546
Location: Bhavnagar, Gujarat, India
gaba88
Offline
Forum Nokia Champion
|
|
|
Quote:
the forum is al about spreading the knowledge. And dont worry abt asking stupid questions. Forum is to help developers in any sort of matter. And dont forget to install the Lib files always in the E:\\python\\libs. and in the main code import that. thanks Gargi Das- http://gargidas.blogsot.com Forum Nokia Python Wiki Learn Python at http://mobapps.org/PyS60
Last edited by gaba88 : 2008-04-09 at 21:44.
Reason: incmplete answer
|
|
Quote:
Cheers, --jouni |
|
Is it possible to use phone's camera application and automatically add metada to those image files with pexif when you shoot a picture? I think it should be then some kind of background application..
|
| DrivingMobileInnovation |
| View Public Profile |
| Find all posts by DrivingMobileInnovation |
|
When I take a photo with my N95 camera app and try to add data to the file using pexif, it says unknown maker: Nokia.
But if I use selfmade Python Camera app, it works fine. So how can I solve this problem? |
| DrivingMobileInnovation |
| View Public Profile |
| Find all posts by DrivingMobileInnovation |
|
Join Date: Feb 2008
Posts: 2,546
Location: Bhavnagar, Gujarat, India
gaba88
Offline
Forum Nokia Champion
|
|
|
Quote:
The problem can with your code plz can you show bit of code so that the forum can help more. thanks Gargi Das- http://gargidas.blogsot.com Forum Nokia Python Wiki Learn Python at http://mobapps.org/PyS60 |
|
The code is exactly same in both cases. It's in Pexif examples. Maybe Nokia files aren't supported.
|
| DrivingMobileInnovation |
| View Public Profile |
| Find all posts by DrivingMobileInnovation |
|
Join Date: Feb 2008
Posts: 2,546
Location: Bhavnagar, Gujarat, India
gaba88
Offline
Forum Nokia Champion
|
|
hi DrivingMobileInnovation
it seems there can be some other problem with the phone itself. might be some sort of settings Gargi Das- http://gargidas.blogsot.com Forum Nokia Python Wiki Learn Python at http://mobapps.org/PyS60 |
|
N95 camera creates its own exif header to a photo. And I think that's why Pexif can't handle it.
|
| DrivingMobileInnovation |
| View Public Profile |
| Find all posts by DrivingMobileInnovation |
|
Here is my simple code example (made for N95):
Code:
import e32, appuifw, key_codes, os, os.path, pexif, sys, time
from pexif import JpegFile
from e32 import *
def app_path():
global PATH
PATH = 'e:\\Images\\' + year + month + '\\' + year + month + 'A0' # photo folder
if not os.path.exists(PATH):
os.makedirs(PATH)
def date():
global month, year
year = str(time.localtime()[0]) # 2008 2009 and so on
m = time.localtime()[1]
if m < 10:
month = '0' + str(m) # 01 02 03 04 05 06 07 08 09
else:
month = str(m) # 10 11 12
def old_pics():
global i
i=0
for f in os.listdir(PATH): # amount of old pics
i+=1
def new_pics():
global filename
a=0
for f in os.listdir(PATH): # amount of new pics
a+=1
if a > i: # if there is more new pics than old ones, add data to the exif
filename = f
save_exif()
def save_exif():
img = pexif.JpegFile.fromFile(PATH + '\\' + filename)
img.get_exif().get_primary()[pexif.ImageDescription] = "Hello world!"
img.writeFile(PATH + '\\' + filename)
def camera():
start_exe('z:\\system\\apps\\cammojave.exe','',1) # N95 camera app
def quit():
app_lock.signal()
appuifw.app.body = canvas = appuifw.Canvas()
appuifw.app.screen = "large"
appuifw.app.exit_key_handler = quit
date()
app_path()
old_pics()
camera()
new_pics()
app_lock = e32.Ao_lock()
app_lock.wait()
Last edited by DrivingMobileInnovation : 2008-04-29 at 21:01.
|
| DrivingMobileInnovation |
| View Public Profile |
| Find all posts by DrivingMobileInnovation |
| Reply | « Previous Thread | Next Thread » |
| Thread Tools | Search this Thread |
|---|---|
| Rate This Thread | |
| Thread | Thread Starter | Forum | Replies | Last Post |
|---|---|---|---|---|
| [announce] PyUIQ. Python for UIQ 2.1 and 3.x | OscarBernabeu | Python | 35 | 2008-01-17 10:12 |
| Contacts fields order?? | timatima | General Symbian C++ | 1 | 2007-06-08 14:51 |
| Automatically sending photo with metadata | jje007 | Mobile Java General | 1 | 2005-04-29 21:18 |
| Automatically sending photo with metadata | jje007 | Mobile Java Media (Graphics & Sounds) | 1 | 2005-04-27 09:40 |
| How to create mbm file? | qt_raip | Symbian Tools & SDKs | 13 | 2004-05-12 12:07 |