Main Menu

"City" tag goes missing

Started by QPRJohn, March 28, 2015, 12:21:58 PM

Previous topic - Next topic

QPRJohn

Hi All

I'm using Exiftool in conjunction with ExiftoolIO produced by Curtis (great accompaniment to the great Exiftool!) I'm using VB.Net on a Windows 7 platform.

I have a user form that displays various XMP, IPTC and EXIF tags. I've been using it for sometime now without any problems, I recently modified it so that I could scroll through the images in a directory without having to close and re-open the form each time to load a new image. I was originally using Exiftool on it's own, I couldn't work out how to use the -stay_open function so I used ExiftoolIO and utilised the -stay_open function it provides.

When I scroll from image to image, Exiftool reads the Metadata and outputs it in a JSON format to which in turn I get the information for each tag and fill the corresponding textboxes. This works fine until I make any kind of changes (to any tag) it then builds the arguments to send to Exiftool and executes them fine, the image metadata is updated.  What happens is that the next time it reads the metadata the "City" tag is missing and therefore shows no value in the "City" textbox.

If I change the value of the "City" tag and save it, it does not show the new value in my form, it does however show the new value in Adobe Bridge and Photomechanic so I know that it is being saved. If I stop Exiftool and restart it then the "City" tag is shown again?

Can anyone help me with this?

Regards John

Curtis

Hi John,

That is strange.  So if I understand correctly, you are using JSON format for both output and input, you get a tag value using exiftoolio, put it in a text box, edit the value,  convert to JSON format write the value back to the file using exiftool.  Then if you view a different jpg file and then go back to the one you had edited the tag value in, then when you get the tag value again, same way as before the tag value shows up as blank.  And then if (while your program is still running?) you look at the file with Photomechanic you can see the updated City tag, right?

Seems like for some reason in your program it is not calling exiftool again to read back the updated City tag value when you go back to a file you have already previously read in. To track down where it has 'gone missing' I would try putting in a call something like:

ExifToolIO.Cmd("-City")

Dim result As String = ExifToolIO.Execute(fn)

Not sure on the exact tag name you need, but change "-City" to what it needs to be.  And set fn to the file name you want the tag from.  I'd put this code in just before where ever it is you are filling in the textbox value and see if at that point you can get the right value which you should see in 'result' ... (put a break point there?)  If at that point you are not getting the updated value in result, then I am baffled.  If you are, then you need to look at your code as to how/if you are getting the updated value.

You could also put this code snippet right after you update the value (from the text box) with exiftoolio, if you don't get back the updated value then there is an other baffling problem.

Curtis


QPRJohn

I eventually found the missing tag, I didn't realise that the tag existed in both the "IPTC" and "XMP-photoshop" groups!

John