Re: [Gexiv2] Hello?



On Thu, Jun 28, 2012 at 12:52 PM, Eric Gregory <eric yorba org> wrote:
You might try taking a look at WebKitGTK, it's similar in that it's
implemented C++, and they managed to support GIR.

Yeah, sorry for that last message, I'm kind of all over the place
here. The critical piece of info I was missing was that I didn't know
I needed to pass --symbol-prefix argument to g-ir-scanner. Now that
I've done that, some actual API is showing up in Python. I haven't
tested it extensively yet, but it's showing promise:

$ python
Python 2.7.3 (default, Apr 30 2012, 21:18:11)
[GCC 4.7.0 20120416 (Red Hat 4.7.0-2)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
from gi.repository import GExiv2
GExiv2.initialize()
True
GExiv2.Metadata()
<Metadata object at 0x7f62e68c06e0 (GExiv2Metadata at 0x70f920)>
f = GExiv2.Metadata()
f
<Metadata object at 0x7f62e68c06e0 (GExiv2Metadata at 0x70f9e0)>
f.open_path('/home/robru/Applications/gottengeography/demo/IMG_2411.JPG')
True
f.has_tag
<bound method Metadata.has_tag of <Metadata object at 0x7f62e68c06e0
(GExiv2Metadata at 0x70f9e0)>>
f.has_tag('Exif.Image.Make')
True
f.has_tag('Exif.Image.Makeeasdfg')
False
f.get_tag_string('Exif.Image.Make')
'Canon'
f.get_tag_string('Exif.Image.Model')
'Canon PowerShot A590 IS'

Although I still haven't written any transfer annotations so most
likely this is leaking memory like crazy at the moment. I'll keep
playing!

-- 
http://exolucere.ca



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]