Re: [Gexiv2] Extract all keywords from image Python GExiv2



Thanks a bunch. I've been trying to figure this out for an hour.


Jason
moorepants.info
+01 530-601-9791


On Sun, Aug 18, 2013 at 4:04 PM, Robert Park <robru gottengeography ca>wrote:

You need to use get_tag_multiple to get the full list of values held
by that tag. The dict notation you're using is slightly limited in
that (as the bindings currently exist) it only ever returns a single
string.

metadata.get_tag_multiple('Iptc.Application2.Keywords')
['first', 'second', 'third']

On Sun, Aug 18, 2013 at 1:56 PM, Jason Moore <moorepants gmail com> wrote:
Hi,

I'm using the python wrapper for GExiv2 and want to extract all keywords
from an image.

metadata = GExiv2.Metadata('p1090380.jpg')
metadata.get_iptc_tags()
['Iptc.Application2.Keywords',
 'Iptc.Application2.Keywords',
 'Iptc.Application2.Keywords',
 'Iptc.Application2.Keywords',
 'Iptc.Application2.Keywords',
 'Iptc.Application2.Program',
 'Iptc.Application2.ProgramVersion']
metadata['Iptc.Application2.Keywords']
'first keyword'

It is not clear to me how to access the other keywords since they all
seem
to have the same iptc tag name.

Jason
moorepants.info
+01 530-601-9791
_______________________________________________
Gexiv2 mailing list
Gexiv2 lists yorba org
http://lists.yorba.org/cgi-bin/mailman/listinfo/gexiv2



--
Troubles are handled with propriety and no delay,
all I have to do is draw the anchor up and float away.
                                   -- Buck 65




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