...Right ... I am not an expert in EnglishCameronD wrote:... The option presumably must apply to all image files, or none, and the wording should be clear about this.

Moderators: XnTriq, helmut, xnview
...Right ... I am not an expert in EnglishCameronD wrote:... The option presumably must apply to all image files, or none, and the wording should be clear about this.
Really? Let's see...I don't see a major problem at all - if dates are newer then simply check if any mapped item is different between file and DB. There is not a lot of data to check. If the user has selected to keep embedded metadata in sync then update the DB. If the user has selected to ignore embedded metadata then ignore it.Well, here is a problem. Theoretically you're right. But in practice, we cannot distinguish between image data change and embedded metadata change...
Code: Select all
bSidecar := FileExists(Sidecar); //test for the existence of sidecar
if Photo.mDate > DB.mDate then
{
if bSidecar then
{
if Sidecar.mDate > DB.mDate then
{
case AskTheUser of //ok, switch in C++
0: Import_From_Sidecar; //default
1: Import_From_Embbeded;
2: //do nothing - this is the "Cancel" button
end; // case
}
else
Import_From_Embedded;
}
else
Import_From_Embedded;
}
else
{
if bSidecar then
{
if Sidecar.mDate > DB.mDate then
{
Import_From_Sidecar;
}
} //if bSidecar
}
My original comment was in the case that:m.Th. wrote:Really? Let's see...I don't see a major problem at all - if dates are newer then simply check if any mapped item is different between file and DB. There is not a lot of data to check. If the user has selected to keep embedded metadata in sync then update the DB. If the user has selected to ignore embedded metadata then ignore it.Well, here is a problem. Theoretically you're right. But in practice, we cannot distinguish between image data change and embedded metadata change...
This is not the situation of your example, where both image and sidecar have been modified.If XnView can detect that the image file has been recently changed, but the sidecar has not been modified...
Note: all I have done here is change who used S1 and E1, plus I added an extra level of change.
On 1/1/2014: - XnViewMP scans the file and puts in DB the thumb, metadata (if finds) etc.
2/1/2014: The user with S1 enters the categories "Portrait", "John & Vangelis" and edits the caption.
3/1/2014: The user with E1, more knowledgeable, fixes the categories changing the "John & Vangelis" to "Jon and Vangelis" (removes the 'h') and adds 'Jon Anderson', ' Vangelis Papathanassiou', 'singer', 'musician', 'electronic', 'progressive rock' etc.
4/1/2014: Another user with E2 (or even E1) makes some edits to the scanned photo (brightness, vibrance, removes noise etc.) but it doesn't touch the metadata.
Hello,CameronD wrote:... The question that is still to be answered is: what happens to the embedded metadata that is out of date if XnView has been told not to touch the image file? To my mind, the worst option would be to leave the bad data in place. To answer that question, maybe we need somebody like Oops66, for whom it is more of a concern.
You beat me on it.hic wrote:I would like to sum up this thread a little bit because it get's confusing.
1. The initial request was to prevent XMP-sidecars from being written for JPG and TIF. I guess this could be done by a simple "if" statement before the writing process.
2. The second request was to have an option to automatically update files and XMP-sidecars when database was changed.
3. The third request was, if it would be possible to handle other sidecars in file manamegent operations. These sidecars don't contain metadata, it thus would not be necessary to parse them but only to give an option to consider them in file management, i.e. copying, deleting etc. If in the options the opportunity would be given to define a custom sidecar which afterwards is defined by the system as belonging to image files, it would be sufficient.
Regards,
hic
The Research part is IMHO solved. Needs implementation.xnview wrote:Currently if export is enabled, jpeg/png files are updated, and not for other
But if i add sidecar support, they will be
So like that?
Export to:
* None
* Metadata when possible
* Metadata and sidecar
* Sidecar
Agree. Hence XnView must ask the user.If both files are newer than the DB, then XnView cannot make any assumptions at all.
Here is the problem. While theoretically I agree, practically I think that the process can be rather slow (remember that usually there bunch of files/folders imported not just one or two) and troublesome from user's POV. Asking for each conflicting metadata field for each one of 100 - 600 - 1000 photos is quite a challenge for the user. Also, the code can become complicated.The only sensible course now is for XnView to scan each metadata field (where there are equivalent values in the DB and in the files) and compare against the DB contents.
I agree with you in the list above if in topic two a XMP is created/updated only if wrtiting of metadata is not possible (for raw files). Otherwise we would end up with the current situation that we would have to tick option three and sidecars would be written for JPG, which is useless as no other program recognizes sidecars for JPG.m.Th. wrote:
1. Metadata placement
We need two options: embedded and sidecar regardless of file type.
I think that this is solved & summed up in Pierre's post here:
The Research part is IMHO solved. Needs implementation.xnview wrote:Currently if export is enabled, jpeg/png files are updated, and not for other
But if i add sidecar support, they will be
So like that?
Export to:
* None
* Metadata when possible
* Metadata and sidecar
* Sidecar
PS: Yes, I know, no SilkyPix/Capture One support. But for this I think that's better to introduce a separate feature: Before/AfterFileOperation events: The ability to execute a parametrized custom script with {Folder} as argument Before/After each CMDR action. Hic (you're the most interested in this) what do you say? Perhaps is better to start another thread for this?
well, I have already disagreed with myself here - automatic processing can still be possible in some cases, as in the following ...m.Th. wrote:Now commenting on the battlefield:
Agree. Hence XnView must ask the user.If both files are newer than the DB, then XnView cannot make any assumptions at all.
I think is is much less cpu effort than you think. In the case of embedded metadata , XnViewMP already scans every newer file and automatically updates metadata in the DB. To do this it has already opened the file, read the header and then scanned through it locating the relevant bits of metadata. A string compare is a trivial addition by comparison.Here is the problem. While theoretically I agree, practically I think that the process can be rather slow (remember that usually there bunch of files/folders imported not just one or two) and troublesome from user's POV. Asking for each conflicting metadata field for each one of 100 - 600 - 1000 photos is quite a challenge for the user. Also, the code can become complicated.The only sensible course now is for XnView to scan each metadata field (where there are equivalent values in the DB and in the files) and compare against the DB contents.
I agree solution 2 is probably unworkable in its full scope, but solution 1 is next to useless in most situations I am envisaging.There are some solutions here to consider:
Solution 1. I think that the only real solution is to ask just once: "Conflicts detected. What to take precedence? {Embedded} {Sidecar} {Cancel Import of metadata}"
Solution 2. Make a list of conflicts (which will grow up very quickly) and show it... ..
Hmmm... you forget that now XnView MP blindly updates the metadata. Hence, if your proposal will be accepted, (and I'm not against to it - providing that this "field-by-field" mode will occur just in rare occasions) the algorithm will be like this:I think is is much less cpu effort than you think. In the case of embedded metadata , XnViewMP already scans every newer file and automatically updates metadata in the DB. To do this it has already opened the file, read the header and then scanned through it locating the relevant bits of metadata. A string compare is a trivial addition by comparison.
Well, this is exactly what I said:Automatically assign precedence to sidecar/embedded (this covers the 3rd situation where the user knows what the issue is)
...to ask just once: "Conflicts detected. What to take precedence? {Embedded} {Sidecar} {Cancel Import of metadata}"
Not quite. Everything is in the DB. All the metadata, file properties and thumbnail. The file is read (scanned) only at the first time - when the thumbs are generated....After all, XnView always has to read the file and metadata to display a lot of the contents that are not in the DB.
I may be getting old, but I have not yet forgotten that. In the current form of the program, there should only be one source of external metadata, and therefore blindly updating it should be valid, so long as the user has selected to keep DB and external metadata in sync.m.Th. wrote:Hmmm... you forget that now XnView MP blindly updates the metadata. Hence, if your proposal will be accepted, (and I'm not against to it - providing that this "field-by-field" mode will occur just in rare occasions)...
In the situations I am thinking of, it is clear that something has potentially gone horribly wrong, and if you are thinking of hundreds of images then we may assume it took days of work to get to the situation. Even if it takes 10 seconds per image, that is certain to be far less than I or somebody else spent on the changes. I certainly hope it would be a rare situation.This is slower than what we have now ... As I said, of course, this will be a problem when we have many photos (IOW an entire card has "wrong" metadata WRT to our workflow).
yes, I was just offering reasons why it is not enough on its own.Well, this is exactly what I said: ...Automatically assign precedence to sidecar/embedded (this covers the 3rd situation where the user knows what the issue is)
OK, maybe I am getting a bit old - I had forgotten about the "meta" blob, but my excuse is I've never been able to tell what is in itNot quite. Everything is in the DB. All the metadata, file properties and thumbnail. The file is read (scanned) only at the first time - when the thumbs are generated....After all, XnView always has to read the file and metadata to display a lot of the contents that are not in the DB.
Heh! Two elders chattin' in a forum. ...perhaps we'll met in paradise in few days from now.OK, maybe I am getting a bit old...
Oh, son... You're old, but perhaps I'm older than you. At least in certain areas.In the situations I am thinking of, it is clear that something has potentially gone horribly wrong, and if you are thinking of hundreds of images then we may assume it took days of work to get to the situation...
Sure is a rare situation (a corner case) - and that's why I don't press to much for processing speed - but one can reach there very quickly. You know, the mess which one clueless can do in 10 secs, 10 wise men aren't able to clean up in 10 days.Even if it takes 10 seconds per image, that is certain to be far less than I or somebody else spent on the changes. I certainly hope it would be a rare situation.