<p>Ah, I see now. It is due to the bad behavior of the template in digikam. I have no city set in my template, and yet it insists on overwriting existing data to null. Yes, this must be fixed--very bad...</p>
<div class="gmail_quote">On Jan 29, 2012 12:39 AM, "Erik Felthauser" <<a href="mailto:efelthauser@gmail.com">efelthauser@gmail.com</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Sorry, I guess I spoke too soon. Can someone more knowledgeable tell me why, after applying the described metadata changes using exiv2 and doing a "Re-read Metadata From Image" in digikam (changes confirmed by digikam's own metadata viewer as well as an external one), that when subsequently adding a caption to the image in digikam, why does the Xmp.photoshop.City field get set to null? And yet the Xmp.iptcExt.City field is not affected.... Both fields should be left intact...<br>
<br>Any ideas?<br><br><br><br><div class="gmail_quote">On Sat, Jan 28, 2012 at 5:10 PM, Erik Felthauser <span dir="ltr"><<a href="mailto:efelthauser@gmail.com" target="_blank">efelthauser@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hello Andrew and anyone else with this issue:<br><br>I have figured out a fairly simple way to continue using digikam, while being able to easily batch-apply any metadata you like to a bunch of photos at once.<br><br>My method involves using the command line (which, if you are not used to it, can be a little intimidating, and frankly dangerous, but after a little learning of the basics, you will find that many things can be accomplished as easily, if not much more easily, as using a GUI).<br>
<br>digikam (and, i believe, the kipi metadata-editor plugin) uses a command-line back-end program called exiv2 to work with the metadata in our images. since the metadata tools in digikam are not currently meeting our needs, I decided to investigate the option of using exiv2 directly for the purpose of applying certain metadata en-masse. (if you have digikam installed, i believe you already have exiv2 installed as a dependency.)<br>
<br>the main metadata that I like to apply to many images at once is 'City'. other things like my name, copyright, etc, I use a digikam template for.<br><br>so, I figured out what xmp field (xmp=state-of-the-art type of metadata) digikam (version 2.5 at least) is using to set the City information. it is using a field in the "photoshop" namespace of the XMP specification.<br>
<br>after reading a little more about various XMP namespaces, I discovered that there is some overlap in terms of where certain info can be stored. Now, I prefer to use XMP metadata, because that is the future, not the old way which was the IIM block. use of the IIM block was originally established by adobe and the IPTC. but since then, XMP has been devised. all tags in XMP must be a member of a "namespace". there are two main ones in which City can be set: Xmp.iptc4xmpEtc.City and Xmp.photoshop.City. [[for simplicity, some programs like exiv2 abbreviate the Xmp.iptc4xmpEtc namespace to xmp.iptcExt. however, i believe that what they actually write to your file is the proper iptc4xmpEtc, a point that I found briefly confusing]] Anyway, I think it is unfortunate that both of these fields exist, as it represents a possibility for conflict. but it seems that in the future, the "IPTC Extended" namespace may be preferred over the photoshop namespace. So, I have decided to be "in the moment" with digikam and also "forward-looking" by setting BOTH fields simultaneously.<br>
<br>to do this, I am doing the following:<br><br>first, open a terminal. create a custom environment variable called "prettycity" with the value of "Paris" by typing the line below, and then hit enter:<br>
<br>prettycity=Paris<br><br>next, type the line below, but do not hit enter yet:<br><br>exiv2 -M"add Xmp.iptcExt.City $prettycity" -M"add Xmp.photoshop.City $prettycity"<br><br>next, using a file browser such as nautilus (it helps to enable thumbnails) select and drag all the images you want to tag as 'Paris' onto the terminal window, and hit enter.<br>
<br>This will apply 'Paris' to all of them, and digikam will recognize the changes.<br><br>If you then get to some photos that need a different value for the City tag, simply update the shell variable the same way you set it to Paris:<br>
<br>prettycity=Rome<br><br>and now, you are ready to label your Rome photos.<br><br>if you want to set other fields besides city, you can figure out what to refer to the field as by referring to the exiv2 website:<br><a href="http://www.exiv2.org/metadata.html" target="_blank">http://www.exiv2.org/metadata.html</a><br>
You may have to dig around a bit in all those pages to find the namespace where the field you need is located, but it should be listed there somewhere. but, the most common ones are the dc (=dublin core), IPTC Core, IPTC Extended, and photoshop namespaces.<br>
<br>Of course, before you try something new,<u><b> always backup your photos</b></u> and confirm what your think you're doing to them is actually what happens before you go crazy on them :)<br><br>Also, if you are not needing to set the same value on multiple fields at once, it is not necessary to use environment variables. In that case, the command could be simplified to this, assuming you want to apply "Paris" to "image.jpg":<br>
<br>exiv2 -M"add Xmp.iptcExt.City Paris" image.jpg<br><br>Hope this helps. Cheers.<div><div><br><br><br><div class="gmail_quote">On Fri, Jan 27, 2012 at 2:44 AM, Andrew Goodbody <span dir="ltr"><<a href="mailto:ajg02@elfringham.co.uk" target="_blank">ajg02@elfringham.co.uk</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div>On 23/01/12 00:53, Erik Felthauser wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
I think I used to be able to edit additional metadata such as 'city' via<br>
the Information tab of the caption/tags sidebar. However, I think since<br>
upgrading ubuntu to 11.10, I no longer can. If I click on one of the<br>
fields there (below the template selector dropdown), I cannot edit any<br>
of them: no cursor appears.<br>
<br>
I have tried digikam 2.1 in regular ubuntu repo, as well as 2.5 from the<br>
philip5 ppa.<br>
</blockquote>
<br></div>
I also cannot do this in 1.9.0 but I would find it very useful to be able to do it.<div><br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Is it supposed to be possible to do this, or is it just my imagination<br>
that I used to? I found a tutorial suggesting it is possible:<br>
<a href="http://scribblesandsnaps.wordpress.com/2011/02/22/work-with-photo-metadata-in-digikam/" target="_blank">http://scribblesandsnaps.<u></u>wordpress.com/2011/02/22/work-<u></u>with-photo-metadata-in-<u></u>digikam/</a><br>
</blockquote>
<br></div>
I do have a vague recollection that I too used to be able to do it.<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
If this is indeed _not_ possible, is the only way to edit the city<div><br>
fields (besides hardwiring it into a template), then, to use the kipi<br>
Image>Metadata>'edit all metadata' menu item window?<br>
</div></blockquote>
<br>
Well at least there is a workaround even if it is annoyingly difficult to use.<br>
<br>
Andrew<br>
______________________________<u></u>_________________<br>
Digikam-users mailing list<br>
<a href="mailto:Digikam-users@kde.org" target="_blank">Digikam-users@kde.org</a><br>
<a href="https://mail.kde.org/mailman/listinfo/digikam-users" target="_blank">https://mail.kde.org/mailman/<u></u>listinfo/digikam-users</a><br>
</blockquote></div><br>
</div></div></blockquote></div><br>
</blockquote></div>