Labels different in IM5 and Lightroom

Started by KimAbel, October 21, 2013, 09:13:20 AM

Previous topic - Next topic

KimAbel

I guess this has something to do with my settings and not a bug.

In Lightroom I am developing my raw's and changing labels and sometimes ratings. When I am switching to one of the coloured labels in Lightroom, and switching between the coloured labels IM5 can read the correct colour. But when I am changing from one of the coloured labels to none then IM5 switches to the first coloured label instead of none!

Am I using the wrong settings in the XMP-import-export dialog? I a, using sidecars for raw and imbedded for jpg and tif in both programs.

Kim Abel


[attachment deleted by admin]

Mario

The label is a free text stored in the XML label metadata tag.
When you set the label to none in IMatch, IMatch sets the label to an empty string. On write-back, ExifTool removes the label tag completely from the XMP record. Both an empty label tag and no label tag at all are to be considered as "no label".

QuoteBut when I am changing from one of the coloured labels to none then IM5 switches to the first coloured label instead of none!
Not sure that I get this right. You are changing the label to none in LR or in IMatch?
When you look at the file in the Metadata Panel and search for label, which label is shown in IMatch?
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

Ferdinand

Further to Mario's comment, I would suggest that XMP Write Mode be set to the Always Use XMP Sidecars Option.  If you don't do this and there isn't a sidecar, then IMatch will embed ratings and labels and then there is the potential to have conflicting metadata, since LR will always use sidecars for RAW.  This setting won't effect JPG and TIFF, given your settings to always embed in those formats.

Getting the exchange of metadata between LR & IMatch is tricky.  IMHO it's safest to have immediate write-back enabled in IMatch, and in LR in Catalog settings, metadata tab, to have Automatically Write Changes Into XMP enabled.  This will mean that you don't have both programs with metadata cached and waiting to be written, only one of which can be.  This workflow is a little slower than caching writeback, but it minimises the risk of data loss.

With this workflow, if you change a rating or label in one program, you may still need to refresh in the other in order to see the changes.  I wonder if caching of changes and / or a failure to reread XMP is the source of your problems.

KimAbel

The switching between labels are mostly done in Lightroom.

QuoteNot sure that I get this right. You are changing the label to none in LR or in IMatch?

When I am switching label from red to green and then to none in Lightroom, IM5 automatically can read the switch from red to green, but not to none. Instead iIM5 switches back to the red (the first lalbel).

QuoteWhen you look at the file in the Metadata Panel and search for label, which label is shown in IMatch?

Both the metadata panel and the thumbnail shows red in IM5, but none in Lightroom.

Kim

Mario

Quoteshows red in IM5, but none in Lightroom.
So that's the reason. The label in XMP is set to "red".

1. Does IMatch reload the metadata after you have updated the file in LR? LR uses a cache and may delay updating XMP data in files...

2. Check your Protection settings under Edit > Preferences > Metadata 2. If IMatch has a pending update for the label (you have changed the label in IMatch but not written back the file) it will not replace that information when it reloads the metadata from the file. This is to protect metadata modified in IMatch from becoming accidentally overwritten by another application. When Protect unwritten data  or Protect Rating and Label is set to yes, IMatch will not pick up changes made to the label in LR if IMatch has a pending update for the file.

Set these options to No and retry your experiment.

Note: Changing XMP data in multiple applications can cause problems. You have to make sure that all applications in the loop are updating the XMP data immediately in the file on disk. In IMatch this means that you either do a manual write-back of files you intent to open in LR, or you set IMatch to automatic background write-back under Edit > Preferences > Background Processing.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

KimAbel

QuoteI would suggest that XMP Write Mode be set to the Always Use XMP Sidecars Option.

The settings showed "Use existing XMP sidecar file, else use Mode 1", but after switching to "Always write to XMP sidecar files (Default)" the same problem persists. (I cant remember switching this away from the default value!).

Kim

KimAbel

Quote1. Does IMatch reload the metadata after you have updated the file in LR? LR uses a cache and may delay updating XMP data in files...

Yes, IM5 has reloaded the metadata. I have also tried "rescan now - reload metadata" without success.

Quote2. Check your Protection settings under Edit > Preferences > Metadata 2. If IMatch has a pending update for the label (you have changed the label in IMatch but not written back the file) it will not replace that information when it reloads the metadata from the file. This is to protect metadata modified in IMatch from becoming accidentally overwritten by another application. When Protect unwritten data  or Protect Rating and Label is set to yes, IMatch will not pick up changes made to the label in LR if IMatch has a pending update for the file.

This is already set to "No".

QuoteNote: Changing XMP data in multiple applications can cause problems. You have to make sure that all applications in the loop are updating the XMP data immediately in the file on disk. In IMatch this means that you either do a manual write-back of files you intent to open in LR, or you set IMatch to automatic background write-back under Edit > Preferences > Background Processing.

Lightroom writes back changes immediately. In IM5 I use manually writeback, but I try to update this before I goes to Lightroom.

Kim

KimAbel

I have also tried to change the label in IM5 to none, but when I execute the write back the label switches back to red!

Kim

Mario

Which file format are you using?
Maybe this is caused by an image which has both an embedded XMP record and a sidecar file?
I cannot reproduce this and since you are the first (only) user with this problem this must have something to do with the file format or the XMP data.
Please send me a file which exhibits this behavior (plus sidecar file if used). And your metadata 2 settings (screen shot).
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

KimAbel

I am using Canon .cr2-files.

Attached is a screenshot of the settings. As explained earlier in the post i have used "Use existing XMP sidecar file, else use Mode 1", but I cant remember switching this from the default value! I have switched to the default value without luck, and I am now using the default value from now on. Lightroom also uses sidecars for my cr2 files. I dont use other programs to manage my files.

I have sent you an e-mail with a cr2 file and the xmp file for testing. The mail has "Labels different in IM5 and Lightroom" in subject.

I cant reproduce this in a couple of other folders I tested so it seem like this is a strange issue with this folder. I have over 100 files with this problem.

Kim



[attachment deleted by admin]

Mario

#10
The file has an embedded XMP record with a red label.
It has an XMP sidecar file without a label.

When I reset the label in IMatch, it is removed and on write-back the label is also stripped from the CR2 file.
LR shows no label afterwards.

I use these settings:



Changing the rating in IMatch. Write-back. Reload in LR. Changed label is visible. No problems.

[attachment deleted by admin]
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

KimAbel

#11
I have the same settings as you except I cant see what setting you have in "XMP Write Mode" (I use "Always write to XMP sidecar files") and I have used "No" in "Protect unwriten metadata".

When I am trying to reset the label in IM5 it shows no label, but when I am excecuting write-back the label goes back to red! Lightroom shows no label. Its only IM5 that wont use the correct label.

Kim

cytochrome

#12
You cannot strip the label from the cr2 if you don't allow writing to the file. Which is apparently what Mario does.

Something I do not understand:   IM seems to read the label from the raw instead from the xmp sidecar although you have set  "Favor sidecar" for import.


Francis

KimAbel

QuoteYou cannot strip the label from the cr2 if you don't allow writing to the file. Which is apparently what Mario does.

In Mario's screenshot of his settings it says "Yes" in the "XMP Write Mode". This is no setting that I have in my Preferences. I guess it says so because "Embed XMP in standard formats" is highlighted in Mario's screenshot. "Yes" is therefore belonging to "Embed XMP in standard formats".

QuoteSomething I do not understand:   IM seems to read the label from the raw instead from the xmp sidecar although you have set  "Favor sidecar" for import.

Yes, and this is strange!

Kim

Ferdinand

I'm not sure I follow all of this, but the problem is that there were both embedded labels and sidecar labels, non?  So the questions are:
. How did the embedded ratings get there?
. How do you remove them?
. How do you want to work in the future?

It's not clear how they got there, but I suspect your XMP write settings, that only used the sidecar if one already existed.  Or perhaps another program, but *not* LR.
Mario's proposed settings would remove the embedded rating, but there are other ways using ExifTool.
If you're working with LR I think that Always Use XMP sidecars is by far the safer XMP Write option.

KimAbel

Hello Ferdinand

Quotebut the problem is that there were both embedded labels and sidecar labels, non?

Yes, there are both embedded and sidecars.

QuoteHow did the embedded ratings get there?

The only programs working with these files is Lightroom and IM5. I sometimes uses PTGui or Zerene stacker and adds files to these programs, but then I only uses jpg. So I dont think that they will cause any trouble. The files that I have trouble with now has never been touched by these programs.

QuoteHow do you remove them?

Yes how? :-) Is there a easy way of removing all the embedded ratings and labels in all photos in a folder?

QuoteHow do you want to work in the future?

My workflow has always been to use Lightroom for rawprosessing and setting labels and ratings. I have thought of using Lightroom to add creator notes on import, but have not come so far yet. After update in IM I modify labels and ratings. In both programs I have used sidecar for raws (at least intended to) and embedded for other fileformats. Earlier in my post I explained that I saw that I had used "Use existing XMP sidecar file, else use Mode 1" even though I cant remember switching to that. I guess IM5 then has written changes to the cr2 if it did not have a sidecar!?

QuoteMario's proposed settings would remove the embedded rating, but there are other ways using ExifTool.

With Mario's settings my database switches back to the embedded label after writeback! So IM5 do not read the sidecar even though my settings are to use sidecar.

Regards
Kim

Mario

QuoteWith Mario's settings my database switches back to the embedded label after writeback!
If you allow the CR2 to be written to (and it is not read-only) IMatch should write to the CR2.

1. Enable verbose logging for ExifTool under Edit > Preferences > Application: Settings.
2. Open the ExifTool output panel (F9,O)
3. Change the label on a CR2 file to none or maybe Yellow
4. Write back
5. Copy/Paste the contents of the Output Panel to your reply. This will tell us if and which files IMatch is updating.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

Ferdinand

Quote from: KimAbel on October 23, 2013, 09:31:27 AM
The only programs working with these files is Lightroom and IM5.

Then it must have been IMatch 5, and I think it was caused by your previous XMP write settings.

Quote from: KimAbel on October 23, 2013, 09:31:27 AM
QuoteHow do you remove them?

Yes how? :-) Is there a easy way of removing all the embedded ratings and labels in all photos in a folder?

I don't understand why following Mario's instructions doesn't work.  I would use Exiftool.  I have a desktop shortcut for this sort of thing, which is:

C:\Users\Ferdinand\AppData\Roaming\GeoSetter\tools\exiftool.exe -xmp:all= -overwrite_original -k

and if you drag and drop the files onto such a shortcut it should delete ALL embedded XMP.  You will need to edit the location of Exiftool, perhaps to use the one in the IMatch5 program folder.  I'd strongly suggest backing up the files before you try this.

It should be possible to use the Exiftool command panel in IMatch 5 to do this, but I am embarrassed to admit that I haven't learnt how to use it yet.  I still have a set of these shortcuts on my desktop that I use.  Well, also I don't use IMatch 5 for production images, and nor should you IMHO.

KimAbel

#18
I managed to get rid of the embedded label and ratings through ExiftoolGUI. I filtered all the cr2 files in the folder and ran "Exiftool direct" on all of them. I removed only the label and the ratings. After a rescan of the metadata in IM5 it all is fine (I first removed all the photos in this folder from Lightroom and imported them back again after IM5 had rescanned them).

Quote1. Enable verbose logging for ExifTool under Edit > Preferences > Application: Settings.
2. Open the ExifTool output panel (F9,O)
3. Change the label on a CR2 file to none or maybe Yellow
4. Write back
5. Copy/Paste the contents of the Output Panel to your reply. This will tell us if and which files IMatch is updating.

I tested this in another folder with this problem (a file with embedded red label and sidecar with no label). First changed to blue and activated write-back and all well. Then to none and write-back, but after a second or two the label switches back to red!

Heres the text from ExifTool:

-overwrite_original
-m
-use
MWG
-ex
-sep

-XMP:Label=Blue
-XMP:CreatorTool=photools.com IMatch 5.0.0.120 (Windows)

-xmp:InstanceID=xmp.iid:0a353f5b-7f46-4c3c-b2c0-d449869d5a18

-MWG:ModifyDate=now
-XMP:MetadataDate=now
F:\Bilder\Bildearkiv original\2013\0816 Svalbard\KA_130816_3410.XMP
-execute9999

    1 image files updated

----- Runtime: 0,1 s.
-overwrite_original
-m
-use
MWG
-ex
-sep

-XMP:Label=
-XMP:CreatorTool=photools.com IMatch 5.0.0.120 (Windows)

-xmp:InstanceID=xmp.iid:43a01cfa-0f05-4e7f-8cc5-af6740bed017

-MWG:ModifyDate=now
-XMP:MetadataDate=now
F:\Bilder\Bildearkiv original\2013\0816 Svalbard\KA_130816_3410.XMP
-execute9999

    1 image files updated

----- Runtime: 0,1 s.


Kim

KimAbel

Perhaps this is related to a earlier bug report from me?

https://www.photools.com/community/index.php?topic=774.0

IM5 is perhaps trying to write keywords and other metadata to the raw file in situations where IM5 cant find a sidecar (since my settings was "Use existing XMP sidecar file, else use Mode 1"), which leads to a corrupt raw file.

Kim

Mario

Quote from: Ferdinand on October 23, 2013, 11:41:36 AM
It should be possible to use the Exiftool command panel in IMatch 5 to do this, but I am embarrassed to admit that I haven't learnt how to use it yet.

Put this into the ExifTool Command Processor:

-overwrite_original_in_place
-xmp:all=
{Files}


This strips all XMP data from all selected files.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

Mario

Quote from: KimAbel on October 23, 2013, 12:46:27 PM
I tested this in another folder with this problem (a file with embedded red label and sidecar with no label). First changed to blue and activated write-back and all well. Then to none and write-back, but after a second or two the label switches back to red!

In both cases, IMatch updates the XMP file only.
In the first write-back it writes a Blue label. In the second write-back, it deletes the label.

I wonder why IMatch is importing XMP data from the CRW even if favor sidecar is set?
Can you disable the option "Embedded XMP in standard formats" (XMP Import) for a test and repeat that

I have changed many things in this area for build 122 and maybe CR2 was considered a standard format in the version you use? If this is the case, the red label should vanish if the setting is off and you force a re-import of the metadata via <Shift>+<Ctrl>+<F5>...
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

KimAbel

QuoteCan you disable the option "Embedded XMP in standard formats" (XMP Import) for a test and repeat that

The same thing is happening!


Kim