# Duplicate keywords



## madman (Jun 19, 2012)

*Duplicate keywords when using NIK software*

I run LR4.1 on OS-X Snow Leopard. I have a hierarchical keyword structure like... (the dots are just for clarity)

1. SUBJECT (not exported)
...Photography
......Background
.........Black
.........White
.....Format
.........Landscape
.........Portrait
.........Square
2. ACTIONS
   etc.

I assign for instance "White" (>Background>Photography) to a couple of freshly imported photos. I do this by Cmd selecting the photos in the grid view, then ticking the left-hand check-box in the Keyword List. Works like a charm.

After exporting the photos, a few pictures in LR have the correct keyword "White" with the hierarchy, but for a couple of others a new  keyword "White" was added to the keyword list, at the top level.

1. SUBJECT (not exported)
...Photography
......Background
.........Black
.........White
......Format
.........Landscape
.........Portrait
.........Square
2. ACTIONS
White

At the moment I correct these mistakes manually, by re-assigning the correct "White" (the one in the hierarchy) and removing/deleting the wrong "White". I tried to identify the exact sequence of actions that could trigger the creation of a new keyword, but so far I could not replicate the behaviour. It stays "random".

Any idea would be greatly appreciated.


----------



## erro (Jun 19, 2012)

Are you re-importing the exported photos?


----------



## madman (Jun 19, 2012)

No re-import. I export, upload to a file storage site and delete from my HD.


----------



## erro (Jun 19, 2012)

So you see a new top-level "White" for the original images? Or is that new top-level "White" not actually assigned to any photo?

Is the hierarchical "White" still correctly assigned to all photos it should be?


----------



## madman (Jun 19, 2012)

The photos that get the wrong "White" have lost the hierarchical "White".
I suspect (but have to double-check it) that the photos with the wrong "White" are the ones I used as a source to export (edited)

One thing I did not specify in the problem description...
I assign the keywords right after having imported  the photos from the card reader (and converted them to DNG). Until then everything works fine.
Then I start NIK-editing the photos, which produces as many TIFs as I run through one of the NIK programmes. I like to edit either copies with LR adjustments or just plain copies. The final TIF file is the one I export. 
I now suspect the problem might be linked to the newly created TIF pictures, which inherit their keywords from the original DNG file.

Edit: clarification and "white" replaced by "White"


----------



## erro (Jun 19, 2012)

But you just said you didn't re-import the exported photos? And now you saw that you suspect the exported ones? Am I not understanding something here?


----------



## madman (Jun 19, 2012)

I suspect the source photos (in LR) for my exports (not the resulting export files), because those photos are automatically created as TIF copies by NIK. 

The steps are as follows:

0. Select a photo in Grid view (or elsewhere, it does not matter)
1. Edit with... let's say NIK ColorEfex,
2. I select "create a copy with LR adjustments",
3. A TIF file is created in LR,
4. NIK opens and allows to apply filters to the TIF file,
5. Upon SAVE in NIK, the modified TIF file closes, the NIK programme closes,
6. The changes to the TIF file become visible in LR.

Between step 3 to 6 the new keyword "White" appears. But this is only my suspicion so far.

Thanks Robert for investigating this matter with me 

- Pierre


----------



## erro (Jun 19, 2012)

OK, now I see what you mean. Right, it could very well be a case of Nik not reading the keyword hierarchy, and upon saving the file it stores the keywords as "plain" keywords. LR then imports the edited file, reads the "plain" keywords and creates "duplicates", though they are not duplicates from LR's point of view since they are at different levels in the hierarchy.


----------



## madman (Jun 19, 2012)

Yes, that is what I suspect. I'll try it out tonight when I'm back home.

Problem at this stage of my investigations is that some keywords are stored correctly and some not. There is no difference (exported vs not exported) between a keyword  that is copied correctly to the new TIF file (with its hierarchy) and one that is copied without.


----------



## erro (Jun 19, 2012)

Big or small letters? White or white?


----------



## madman (Jun 19, 2012)

erro said:


> Big or small letters? White or white?


I must check this (I am not at my Mac at the present).
My keyword list has all words starting with a capital letter. So originally it is "White".
I can only guess that the new one is also "White", anything else would not make sense. But I can only confirm this once I have reproduced the mistake.


----------



## LouieSherwin (Jun 19, 2012)

Hi Pierre,

What version of Nik Color Effects are you using? They did have some problems handling hierarchal keywords in the past. This has been fixed in all the latest releases of their tools except for specific condition, described below, that only affects HDR Effects Pro when you have some terms in your hierarchy excluded from export. 

-louie


----------



## clee01l (Jun 19, 2012)

FWIW, Subject(keywords) and Hierarchical Subject(hierarchical keywords) are two separate fields in the EXIF.  (_I think​ (speculation))_ on import LR reads and imports Hierarchical Subject. If this field is empty, it then imports keywords from Subject. (end of speculation)  When LR writes keywords, it populates both fields properly (i.e "white" will appear both places) if HierarchicalSubject is stripped by a subsequent process, then only the flat Subject field is available to LR on import.


----------



## madman (Jun 19, 2012)

LouieSherwin said:


> ...What version of Nik Color Effects are you using? ...


The latest versions of their suite, i.e. ColorEfex 4 etc. I was not not using HDR Effects when I noticed the keywords issue.


----------



## LouieSherwin (Jun 19, 2012)

Cletus,

I believe your speculation is exactly correct, if there is anything it the hierarchal keywords fields that is what LR uses to populate the keywords in the catalog. It is important to keep in mind that the keywords in the catalog are completely separate from the metadata in the image files. And both keyword fields in the metadata are always built from the catalog data when an image file is written. 

The Edit-in function creates a new image file with both keyword fields populates. It uses all keyword elements from the source image. It does not pay any attention to the "do not export" attributes so all the complete hierarchy is passed through. Nik had problems with some versions of their tools where they munged the hierarchy before you imported the image back into LR. This caused keywords problems similar to what Pierre is reporting.

-louie


----------



## madman (Jun 19, 2012)

clee01l said:


> ......if HierarchicalSubject is stripped by a subsequent process, then only the flat Subject field is available to LR on import.


Hi Cletus, thanks for your input. What (Mac) EXIF reader would you recommend so I can check this? My EXIF Viewer does not show the keywords, although I set it up to display them...


----------



## madman (Jun 19, 2012)

I did a quick test and could reproduce the behavior with a new DNG photo to which I assigned the hierarchical keyword "White".

1. I edited it with Color Efex, which produced a first TIF copy. Keyword is ok.
2. I edited the TIF again with Sharpener, which produced a second TIF. Hierarchical keyword "White" disappeared, plain keyword "White" (spelled like the original) appeared.

So it seems the error occurs when a TIF file is copied into a second TIF file. I will try that with other NIK components to see if any or all produce the same result.
Now I must leave the computer for some time to go and do my ironing part of the household. Otherwise I'll run into other problems <LOL>


----------



## clee01l (Jun 19, 2012)

madman said:


> Hi Cletus, thanks for your input. What (Mac) EXIF reader would you recommend so I can check this? My EXIF Viewer does not show the keywords, although I set it up to display them...


Mac Apps are weak in this regard.  This is online viewer is what I use:
http://regex.info/exif.cgi


----------



## madman (Jun 19, 2012)

A second test shows that the incorrect keyword attribution is with Sharpener 3, not Color Efex 4...



Where I start: an original DNG and a TIF copy made ny Color Efex 4. Everything is correct.


I edit a second time the TIF photo in Color Efex 4, selecting "Copy".


This creates a second TIF file. Color Efex is now open and I convert the file to b&w, followed by SAVE in Color Efex.


Color Efex closes and the converted TIF file becomes visible in LR. Everything is still ok with the keywords.


I edit the second TIF in Sharpener 3, selecting agin the COPY option.


Sharpener creates the 3rd TIF file. Keywords are still ok. I SAVE the sharpening, Sharpener closes and...


... tadaaaa, the keywords are messed up.


----------



## madman (Jun 19, 2012)

A summary of what works fine and what does not:
- Color Efex Pro 4: ok
- Silver Efex 2: ok
- Sharpener 3.0: not ok (both RAW Presharpener and Output Sharpener)
- Viveza 2: not ok
- Define 2.0: not ok

Pretty much obvious on which side the bug is... 
As I use extensively ALL of them, I quickly get a mess with my keywords.
Now I go and check out the NIK forums.
:crazy:


----------



## madman (Jun 19, 2012)

My last experiment says that HDR EFEX PRO also messes up the keywords, however in a different way.
After HDR, the entire structure White>Background>Photography is duplicated, Photography being a top-level keyword. The new TIF file is now assigned with the correct and the wrong keywords.
What a garbage... 

I logged a support ticket with NIK. 'nough for today!

Ah, I almost forgot: thanks Cletus for the link to the EXIF programme


----------



## LouieSherwin (Jun 20, 2012)

Pierre,

Do you have Bridge? The file info in Bridge and Photoshop have a very tool to examine all the metadata in a file. If you use the "Advanced" or "Raw Data" tab in the file info window you can see in detail the metadata xml. The "Advanced" tab presents a somewhat formatted view and the "Raw Data" shows that xml source for all the metadata. 

At least up to CS5 Bridge is not a licensed product so you download any Adobe application that comes with Bridge, Photoshop for example and it will install Bridge. It will continue to work even after the trial license has expired. I don't know about CS6 as Adobe has been changing the licensing and this may not hold true any more.

Exiftool is really powerful but terribly geeky to use, Unix command line and more. There are some GUI's available but I have never tired them since I usually go to Bridge anytime I need a quick look. Show file in Finder and then drag the file to the Bridge icon on my dock then Cmd-I (Ctl-I).

Please report these problems on the Nik forums the company has a presence there and will forward the info to the developers. I am a beta tester for Nik and I will be also followup to have this fixed. 

-louie


----------



## LouieSherwin (Jun 20, 2012)

madman said:


> My last experiment says that HDR EFEX PRO also messes up the keywords, however in a different way.
> After HDR, the entire structure White>Background>Photography is duplicated, Photography being a top-level keyword. The new TIF file is now assigned with the correct and the wrong keywords.
> What a garbage...
> 
> ...



This is the what I was speaking about earlier. Nik actually fixed the handling of hierarchal keywords in HDR Efex Pro 1.2 and almost simultaneously Adobe made a change in LR 3.6 that breaks hierarchal keywords in the way that you describe. 

If you mark any term in  your hierarchy as you and I do for organizational purposes. The Lightroom Export module now removes that term from the hierarchy. They claim that this is fixing a bug but it breaks your keywords when you want to Export and re-import the results. Since HDR Efex Pro uses this to render your raw images before handing off to the merge application the imported HDR image comes back into Lightroom with the truncated hierarchy. This also cause problems for anyone who for example wants to use export to create let's say JPG versions of their master files and import them back into Lightroom to manage the new images. 

Nik is aware of this particular problem. If you search the HDR Efex Pro discussion group you will find my posts. Please add a comment so that they know that others are being effected. I don't know what they can do about it since Export module seems to make this change before it gets into the SDK where it can be undone. 

Here is my post over on the feedback site: Lightroom: Add an option to always export complete keyword hierarchy. You can add you support for them to add this option. 

-louie


----------



## madman (Jun 20, 2012)

LouieSherwin said:


> ...Do you have Bridge? ...


Thanks Louie! I will check it out, it must have installed with Photoshop Elements, of which I have a registered version 8. If not I will find it...



LouieSherwin said:


> ...my post over on the feedback site: Lightroom: Add an option to always export complete keyword hierarchy. You can add you support for them to add this option.


Done


----------



## madman (Jun 20, 2012)

Temporary work-around until the export function is fixed:
- add keywords to the files only after they have been edited with NIK and reimported. 

This means I will change my working method from:
1. Import
2. Keywords
3. Edit
to:
1. Import
2. Edit
3. Keywords

It is a little less pita than always correcting keywords after the automatic reimport


----------



## madman (Jun 19, 2012)

*Duplicate keywords when using NIK software*

I run LR4.1 on OS-X Snow Leopard. I have a hierarchical keyword structure like... (the dots are just for clarity)

1. SUBJECT (not exported)
...Photography
......Background
.........Black
.........White
.....Format
.........Landscape
.........Portrait
.........Square
2. ACTIONS
   etc.

I assign for instance "White" (>Background>Photography) to a couple of freshly imported photos. I do this by Cmd selecting the photos in the grid view, then ticking the left-hand check-box in the Keyword List. Works like a charm.

After exporting the photos, a few pictures in LR have the correct keyword "White" with the hierarchy, but for a couple of others a new  keyword "White" was added to the keyword list, at the top level.

1. SUBJECT (not exported)
...Photography
......Background
.........Black
.........White
......Format
.........Landscape
.........Portrait
.........Square
2. ACTIONS
White

At the moment I correct these mistakes manually, by re-assigning the correct "White" (the one in the hierarchy) and removing/deleting the wrong "White". I tried to identify the exact sequence of actions that could trigger the creation of a new keyword, but so far I could not replicate the behaviour. It stays "random".

Any idea would be greatly appreciated.


----------



## LouieSherwin (Jun 21, 2012)

Hi Pierre,

Thanks for adding your comments not the feedback site. Every little bit helps, One day I still have hope that the Adobe development team will finally have time to work on all the other reported keyword problems and suggestions.

You might want to check out Jeffery Frield's Metadata Wrangler plug-in. It is a post process action that you can activate by making a new export preset for HEP2. I have my own Nik HDR Efex Pro export preset to automatically strip out all keywords from all the images before they are merged. This means that my catalog keywords never get messed up but I still have to go back and copy/past all the keywords into the finished image. 

BTW, I have also reported your findings that some of the other Nik tools  are still not handling hierarchal keywords correctly over on the beta discussion group. 

-louie


----------



## madman (Jun 22, 2012)

LouieSherwin said:


> ...check out Jeffery Frield's Metadata Wrangler plug-in...


Thanks Louie, the link is actually http://regex.info/blog/lightroom-goodies/metadata-wrangler
I discovered this plug-in a couple of days ago but still have to find out whether it would help or just add another layer of complexity to my LR working method.
BTW I got an answer to my bug report from NIK which left me puzzled: they sent me links to downloads with activation codes, bur nowhere they specify version numbers  nor bug fixes. So I am waiting for clarification...


----------



## madman (Jun 22, 2012)

The answer just came in, it says YES. I will dnld the new versions and check them out in the evening. For the time being here are the latest version numbers (that should fix the issue):
- Color Efex Pro 4, v4.002
- Define 2.0, v2.110
- HDR Efex Pro, v1.204
- Sharpener Pro 3.0, v3.008
- Silver Efex Pro 2, v2.004
- Viveza 2, v2.007


----------



## LouieSherwin (Jun 22, 2012)

Pierre,

Thanks for catching the incorrect link. I have edited the post and inserted the correct link. 

Keep in mind that HDR Efex Pro still won't work for any hierarchical keyword where one or more terms have been excluded from export. This is due to the change made in Lightroom 3.5. This is where I use the Metadata Wrangler otherwise every time I export a set if HDR images to HEP it creates bogus keywords in my library. I find it easier to add the missing keywords after the fact than to clean up after each merge.

-louie


----------

