Cannot copy @Keywords

Started by pajaro, January 29, 2014, 09:43:22 PM

Previous topic - Next topic

pajaro

I must be doing something wrong. I tried to copy @Keywords from one image to another one which did not have any @Keywords assigned. All my image files are read-only and XMP are stored in sidecar files. In Preferences-Metadata2 I set Force XMP sidecar files. Copying should be pretty straightforward: I pressed Ctrl-C, selected the destination file and pressed Shift-Ctrl-V, then I selected which attributes should be pasted (I tried different combinations but none of them worked) and hit OK. First I got a message that source and destination files must be on-line and not write protected. It was unexpected as I thought IMatch would read/write from/to sidecar files. Nevertheless, I removed write protection from both files and tried again. This time, the error message did not appear but no @Keywords were copied.

Any suggestion what could be wrong?

JohnZeman

Do you see the yellow pencil icon indicating a writeback is needed?  If so click that, IMatch will then write the @keywords to the file and shortly after that they should appear as you expect them.

pajaro

Quote from: JohnZeman on January 29, 2014, 10:29:55 PM
Do you see the yellow pencil icon indicating a writeback is needed?  If so click that, IMatch will then write the @keywords to the file and shortly after that they should appear as you expect them.

No, the yellow pencil does not appear...

JohnZeman

Ok, then you probably to refresh the @keywords category to load the @keywords from the image into the database.

pajaro

Quote from: JohnZeman on January 29, 2014, 11:08:40 PM
Ok, then you probably to refresh the @keywords category to load the @keywords from the image into the database.

Thanks, but it does not help either :-(.

JohnZeman

Well the only other thing I can think of is to select the image you copied the @keywords to, then do a CTRL+SHIFT+F5 and choose the option to reload metadata.  Might have to refresh the @keywords category again after that.

If that still doesn't do it, Mario will probably have to solve your problem unless someone else has an idea.  All I can tell you is it works for me, I copy and paste @keywords a lot.

pajaro

Quote from: JohnZeman on January 29, 2014, 11:30:55 PM
Well the only other thing I can think of is to select the image you copied the @keywords to, then do a CTRL+SHIFT+F5 and choose the option to reload metadata.  Might have to refresh the @keywords category again after that.

If that still doesn't do it, Mario will probably have to solve your problem unless someone else has an idea.  All I can tell you is it works for me, I copy and paste @keywords a lot.


It also did not work. But thanks for your suggestions.

Mario

#7
The best way to copy keywords from one file to another is via the Keyword Panel.

1. Select the file you want to use as the source. Click on the Copy button in the Keyword Panel.
2. Select the file(s) you want to copy the keywords to, and click on the Paste button.

To copy selected keywords between files:

Select both files in a file window. Make sure you select the source file last so it becomes the focused file.
In the Keyword Panel click on the italic keywords to assign them to both files. The Keyword panel uses an italic font to indicate keywords not assigned to all files in the selection.

The Paste Attributes commands copies metadata between files using ExifTool. It works directly on the files so both the source and the destination file must be on-line and not write-protected.

Which Attributes did you check in the Paste Attributes dialog?

The dialog checks if there are pending write-backs for the source file. If this is the case, it writes all pending changes. Then it produces instructions for ExifTool from your selection in the Paste Attribute dialog and runs the command. If you have selected XMP data, flat and hierarchical keywords should be copied. I just tried and it works.

I think the problem is here that Copy Attributes works on the original file, not the sidecar file. It copies the XMP data into the original file, not the sidecar file. And depending on your metadata settings, IMatch reads the metadata from the sidecar, but not the original file.

If you open the output panel you can see the instructions IMatch is sending to ExifTool.

I checked this and there may be combinations of attributes, metadata settings, file formats, file format options etc. which cause Copy Attributes to fail to to write to the wrong file (original in case of XMP). This is all incredibly complex, the number of options a user can choose. Please give more details.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

JohnZeman

Hmm..  I had never tried using the keywords panel to copy and paste @keywords so I just tried it that way and it doesn't work for me either.  What always seems to work for me though is to select the source image, right click and choose Copy.  Then select the destination image, right click and choose paste attributes.  After refreshing the @keywords category my @keywords are there.

However when I use the keywords panel to copy and paste @keywords, I can see by the keywords panel that they are pasted to the destination image, but as soon as I click on another image then come back, the @keywords are gone. 

This kind of reminds me of the hide from file window category color bug in that I can make the change, but the change is removed once I put the focus somewhere else.

Mario

#9
After pasting, did you commit your changes by clicking on the green arrow or pressing <Ctrl>+<S>?

Because I just noticed that pasting data into the Keywords Panel that way does not trigger the "auto-safe when leaving" mode and when you don't save the changes, they are not saved.

Fixed that straight away. The individual keywords were not marked internally as updated and hence the entire keyword panel was considered as not updated.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

JohnZeman

Uhhhh....you know what Mario? :-[   I hadn't clicked on the green check mark to save the changes, I'm so used to that auto safe when leaving mode that it never occurred to me to do the obvious.  I wonder if that's what pajaro is doing as well?

Anyway, when I do click the green check arrow after pasting the @keywords are saved, so no bug after all other than the auto safe failure bug you just found.

pajaro

Thanks, Mario, for your response. See below.

Quote from: Mario on January 30, 2014, 07:44:04 AM
The best way to copy keywords from one file to another is via the Keyword Panel.

1. Select the file you want to use as the source. Click on the Copy button in the Keyword Panel.
2. Select the file(s) you want to copy the keywords to, and click on the Paste button.


Tried that but it does not work. Actually, it seems to be working (@keywords are copied to the clipboard and seemingly pasted to the destination file) but after clicking the green arrow there are no copied @keywords.


Quote

To copy selected keywords between files:

Select both files in a file window. Make sure you select the source file last so it becomes the focused file.
In the Keyword Panel click on the italic keywords to assign them to both files. The Keyword panel uses an italic font to indicate keywords not assigned to all files in the selection.


I was lucky here. It worked as expected. Unfortunately, it is not very useful for my purpose.


Quote

The Paste Attributes commands copies metadata between files using ExifTool. It works directly on the files so both the source and the destination file must be on-line and not write-protected.

Which Attributes did you check in the Paste Attributes dialog?



I tried several combinations but none of them worked. I assumed that at least All Metadata should work for sure.


Quote

If you open the output panel you can see the instructions IMatch is sending to ExifTool.

I checked this and there may be combinations of attributes, metadata settings, file formats, file format options etc. which cause Copy Attributes to fail to to write to the wrong file (original in case of XMP). This is all incredibly complex, the number of options a user can choose. Please give more details.


Attached is what I got in the Output panel after I selected All Metadata in Paste Attributes dialog.

[attachment deleted by admin]

Mario

ExifTool output panel looks good. ExifTool copies all metadata from the source to the target file.
No errors. IMatch will reload the changes automatically afterwards.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

pajaro

Quote from: Mario on January 30, 2014, 08:37:59 PM
ExifTool output panel looks good. ExifTool copies all metadata from the source to the target file.
No errors. IMatch will reload the changes automatically afterwards.

I tried again, reloaded Metadata, restarted IMatch...didn't help. In any case, as this procedure requires image files not to be read-only, it is not very useful for me. I would rather use the option that uses Keyword panel but it also did not work. Would you be able to figure out what is wrong?

Thanks!

Mario

The Attribute Paste does not handle all special cases you can create using your metadata setup. It uses a general rule which checks if all files which are used for output are writable. Even if the output goes to an XMP file, the original image is still checked in case some of the to-be-written Attributes have to be written to the original file (e.g. IPTC data, EXIF data, GPS data, maker notes etc.).

I did not add special logic to first determine for each file used as a target to determine if only XMP data is written and if this is the case if the XMP data goes to the sidecar file or the target file, and then put up one or more warning messages for the user if one or more of the involved output files are write-protected. The more of such complex logic you heap into a feature, the easier it will break.

The general test logic works well for most users - you may be an exception. When more users run into the same problem, we'll see more reports and I will add this to my to-do list.

I can copy/paste keywords via the Keyboard panel without problems. And the ExifTool output on your system looks good, the data is copied from the JPEG to the JPEG. Do you perhaps use XMP files for your JPEG files? In this case the changes written by ExifTool to the JPEG may be masked by XMP data. As I outlined in my initial post, there may be a glitch here which causes the Paste Attribute command to go only to the original file (since you used all data, which also has to copy IPTC, EXIF, GPS etc which can only go to the original file) but not the XMP file.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

pajaro

Quote from: Mario on January 30, 2014, 09:31:05 PM
I can copy/paste keywords via the Keyboard panel without problems. And the ExifTool output on your system looks good, the data is copied from the JPEG to the JPEG. Do you perhaps use XMP files for your JPEG files? In this case the changes written by ExifTool to the JPEG may be masked by XMP data. As I outlined in my initial post, there may be a glitch here which causes the Paste Attribute command to go only to the original file (since you used all data, which also has to copy IPTC, EXIF, GPS etc which can only go to the original file) but not the XMP file.

The problem has something to do with my non-standard settings (read-only jpgs, forced read/write metadata from/to sidecar files). I used default settings for jpgs in Preferences-Metadata2, removed write protection and then tried copy/paste via the Keyboard panel. It worked flawlessly. However, once I reverted to my settings, metadata did not get written... It's a shame, it can be a time-saver, I used it in IDI quite often. But I understand that you cannot solve individual problems of all users.

Mario

That's what I meant.
You use XMP for JPEG files which is not standard and not recommended.
The Paste Attributes commands does not handle your special construction and updates only the JPEG file but not the XMP sidecar file. IMatch still sees only the data in the JPEG file.

I've added a small fix already for the next release where Paste Attributes updates the XMP file if the write mode settings are configured. But this will work only if the metadata pasted is clean XMP, or "All Metadata" or a mix of IPTC/EXIF/XMP.

Also note: By forcing IMatch to read/write metadata only from XMP you mask out IPTC/EXIF data in the JPEG file. When IMatch updates XMP metadata which requires updates to the corresponding IPTC/EXIF data (and your JPEG files have IPTC/EXIF data), the data will be out of synch. As soon as you process your JPEG files with a software which does not allow you to configure XMP files for JPEG (which are most products) you may run into problems, seeing outdated or just plain wrong metadata.

Write-protecting files, forcing IMatch to work against common practice and established standards is risky and really not recommended. It's far easier to use it in standard mode and keep a backup of your files if you are concerned. And experiments like using XMP with JPEG files and preventing IMatch from synchronizing metadata using MWG rules means calling for trouble in the long term. Just my 2 cents.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

Photon

Quote from: Mario on January 31, 2014, 09:32:19 AM
... It's far easier to use it in standard mode and keep a backup of your files if you are concerned. And experiments like using XMP with JPEG files and preventing IMatch from synchronizing metadata using MWG rules means calling for trouble in the long term. Just my 2 cents.
It is not only about JPG and IMatch. It is about ALL file extensions and ANY good software, which shall be able to respect read-only files and maintain metadata in database and/or optionally in XMP sidecars (RIP Idimager, PhotoSupreme?, Geosetter, JPhotoTagger, ...). I have to admit, that the group of sidecar fans and read-only paranoids is certainly small. But this group has very valid and very professional reasons to do so. Similar story like with non-html-format mail fans and openPGP users. But I think it is reasonable for Mario to concentrate on IMatch issues which are relevant for the majority of users. And which are most relevant for final public release! Just my 1.5 cents.
| IMatch v5.5.8 + Win7proN64bit | Lumix, Pentax |
| ExifTool, ImageMagick, GeoSetter | JPhotoTagger, MusicBee | CaptureOne, LightRoom | jAlbum, WingsPlatinum, Mobjects |

pajaro

Quote from: Mario on January 31, 2014, 09:32:19 AM

I've added a small fix already for the next release where Paste Attributes updates the XMP file if the write mode settings are configured. But this will work only if the metadata pasted is clean XMP, or "All Metadata" or a mix of IPTC/EXIF/XMP.


Hi Mario,

I don't know what you did but copy/paste @Keywords via the Keyword panel now works for me!  :)

However, there's another problem: I cannot search for @Keywords using the Filter panel. When I type in the @keyword, an error message briefly appears (see attachment) but no keywords are shown in the list.

[attachment deleted by admin]

ovrevid

Quote from: pajaro on February 03, 2014, 09:44:06 PMHowever, there's another problem: I cannot search for @Keywords using the Filter panel. When I type in the @keyword, an error message briefly appears (see attachment) but no keywords are shown in the list.

From 5.0.138 release notes:

Added a limit to the Value Filter in the Filter Panel. If the selected tag returns too many unique elements (> 2000), the value filter displays a message and does not retrieve the values or file the list. This avoids excessive memory usage and long execution times when the user accidentally chooses a tag which results in a massive number of items.

I would think this is the probable cause.

br
Vidar
-- Vidar

Mario

I can increase the limit again, no problem. But the filter panel uses plain Windows list boxes or tree controls. And these degrade badly in performance when adding more than a few thousand entries. This is why I set the limit to 2000.

I never thought that somebody would search for keywords using the Filter Panel. Any particular reason why you don't use the Category Panel, the Category View for that purpose?
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

pajaro

Quote from: Mario on February 04, 2014, 09:30:11 AM
I can increase the limit again, no problem. But the filter panel uses plain Windows list boxes or tree controls. And these degrade badly in performance when adding more than a few thousand entries. This is why I set the limit to 2000.

I never thought that somebody would search for keywords using the Filter Panel. Any particular reason why you don't use the Category Panel, the Category View for that purpose?


Well, it may be my lack of experience with IMatch. I will have to check if the Category Panel does exactly what I want and will let you know.

I can't believe I have more than 2000 @keywords in my database... I used the Filter Panel for this purpose in the past and it worked very fast.

Would it be possible to optionally deactivate/change the limit? Thus, it may be there be default but if someone wants it could be increased or switched off.

Mario

I can set the limit to 10,000. I need to check this.
I just added this filter to prevent other users from falling into the same trap as the user who reported a crashing IMatch system with a memory usage of 3.5 GB (!). We finally found out that he accidentally had selected "Created Data" for a Value filter in the metadata panel - for a database with 160,000 files. The filter panel tried to load an estimate of 100,000 values into the filter panel list...

-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

Mario

If you want to filter by keywords, you can also use the Category Filter.

Or, switch to the Category View and select the @Keyword categories you are interested in (using <Ctrl> to select more than one). Or use the Category @Builder to combine multiple categories (aka keywords). If yo use these combinations often, you can produce a new category from the @Builder.

Often users need to query the database for files having certain combinations of keywords, e.g.

"model" AND "female"

or

"location" AND "France"

or even more complex combinations like

"female" AND "model" AND "portrait" AND "studio"

to find all portrait images of female models taken in the studio.

I setup such frequently used combinations once in a formula-driven category and then later only take care that I apply the proper keywords to each file. With a single mouse-click I can then find all files matching the combination of these keywords, either in the Category View or the Category Panel. I can also filter by these "keyword groups" via the Category Filter.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

pajaro

Quote from: Mario on February 04, 2014, 10:40:53 AM
If you want to filter by keywords, you can also use the Category Filter.

Or, switch to the Category View and select the @Keyword categories you are interested in (using <Ctrl> to select more than one). Or use the Category @Builder to combine multiple categories (aka keywords). If yo use these combinations often, you can produce a new category from the @Builder.

Often users need to query the database for files having certain combinations of keywords, e.g.

"model" AND "female"

or

"location" AND "France"

or even more complex combinations like

"female" AND "model" AND "portrait" AND "studio"

to find all portrait images of female models taken in the studio.

I setup such frequently used combinations once in a formula-driven category and then later only take care that I apply the proper keywords to each file. With a single mouse-click I can then find all files matching the combination of these keywords, either in the Category View or the Category Panel. I can also filter by these "keyword groups" via the Category Filter.


Mario, thanks a lot for the explanation. I checked the number of @keywords in my database - its about 1600 of them, but some consist of more words, which most probably gives more than 2000 elements and thus exceeds the limit.

From the options you mentioned above the Category Filter is best for me. The point is that some of my @keywords start with the same sequence of letters (or with the same word) so I was looking for a search function that would offer me possible results (from which I will pick the right one) already after typing several characters. This was (more or less) the case with the Keyword Filter, but can be also applied in the Category Filter.

So, if you find out that increasing the limit to 10 000 will not cause problems, I will use the Keyword Filter. If not, I can use the Category Filter.

BTW, IMatch is really great software. I am amazed how many functions it has. And your support is absolutely perfect. Thanks!