Re-Read some Metadata from NEF not from XMP
Re: Re-Read some Metadata from NEF not from XMP
Michael, now that you are a experienced scripter, would you been so kind to share the PSU- version of the script?
Thank you very much!
Lippe, (unexperienced scripter)
Thank you very much!
Lippe, (unexperienced scripter)
Photo Supreme V6, LR6, darktable, FPV, PSE14 - vaio i5 @ 2.5GHz + 8GB , 850 EVO 500GB - WD 1TB - Windows 10 Pro 64 bits- DS216play - EOS 600D
Re: Re-Read some Metadata from NEF not from XMP
Hi Lippe, This script seems to do a bit more than the implemented "import metadata to xmp"
I have used the script for more than 10k images with great success
Cheers,
Michael
I have used the script for more than 10k images with great success
Code: Select all
{
Description: This script will migrate the existing meta information from the image to XMP; use it with Photo Supreme
Author: Hert, edited by weidmic
Initial date: 2005-01-18
}
var
ATif: TTif;
AXmp: TXMP;
AItem: TImageItem;
i: Integer;
ACatItem: TCatalogItem;
begin
if Selected.Count = 0 then
begin
Say ('No selection made.');
exit;
end;
AXmp := TXmp.Create (False);
ATif := TTif.Create (nil);
ACatItem := TCatalogItem.Create (nil);
try
for i := 0 to Selected.Count - 1 do
begin
ATif.Reset;
AXmp.Reset;
ATif.FileName := Selected.Items[i].ExifFileName;
ATif.Load (True, False);
// now update the XMP
if not Catalog.FindImageCombined (Selected.Items[i], ACatItem, False, phtNone) then
if not Catalog.AddFile (Selected.Items[i], AcatItem, False) then
Continue;
Catalog.LoadXMPForItem (ACatItem, AXmp, Options.CachedXMP);
AXmp.InitializeFromTif (ATif, True, True, True, False, txusAll);
Catalog.SaveXMPForItem (ACatItem, AXmp, Options.CachedXMP);
end;
finally
AXmp.Free;
ACatItem.Free;
end;
end;
Michael
PSUServer 2024.x, PostgreSQL 12.x
My homepage http://www.michaelweidner.com
My homepage http://www.michaelweidner.com
Re: Re-Read some Metadata from NEF not from XMP
Michael, after running the script, it seems that copyright notice is lost. While the Import meta to XMP seems to preserve this information.weidmic wrote:Hi Lippe, This script seems to do a bit more than the implemented "import metadata to xmp"
Lippe .
Photo Supreme V6, LR6, darktable, FPV, PSE14 - vaio i5 @ 2.5GHz + 8GB , 850 EVO 500GB - WD 1TB - Windows 10 Pro 64 bits- DS216play - EOS 600D
Re: Re-Read some Metadata from NEF not from XMP
Lippe,
My camera is writing my name into the copyright field (EXIF nef) - which I want....
When I then execute the script, it will read the value in the exif and overwrite my more sophisticated copyright notice.
That is a little drawback; because I have a formula for the copyright notice, I don't care a lot - I just rewrite the copyrights later again.
I think the script works as it should.
I am sure there would be a way to edit the script that it does exclude a certain exif property.
To make that happen, it needs a very experienced scripter. Experienced is not enough for this
Cheers,
Michael
My camera is writing my name into the copyright field (EXIF nef) - which I want....
When I then execute the script, it will read the value in the exif and overwrite my more sophisticated copyright notice.
That is a little drawback; because I have a formula for the copyright notice, I don't care a lot - I just rewrite the copyrights later again.
I think the script works as it should.
I am sure there would be a way to edit the script that it does exclude a certain exif property.
To make that happen, it needs a very experienced scripter. Experienced is not enough for this
Cheers,
Michael
PSUServer 2024.x, PostgreSQL 12.x
My homepage http://www.michaelweidner.com
My homepage http://www.michaelweidner.com
Re: Re-Read some Metadata from NEF not from XMP
Lippe,
Not sure if this will help, but try to change the fifth parameter of the call to InitializeFromTif from False to True
Hert
Not sure if this will help, but try to change the fifth parameter of the call to InitializeFromTif from False to True
Hert
This is a user-to-user forum. If you have suggestions, requests or need support then please send a message
Re: Re-Read some Metadata from NEF not from XMP
Code: Select all
AXmp.InitializeFromTif (ATif, True, True, True, True, txusAll)
PSUServer 2024.x, PostgreSQL 12.x
My homepage http://www.michaelweidner.com
My homepage http://www.michaelweidner.com
Re: Re-Read some Metadata from NEF not from XMP
Ok, leave it as False then.
The second parameter specifies that the Tiff base tags should be converted
The third parameter specifies that Exif should be converted (maybe you should switch this off)
The fourth parameter specifies that IPTC should be converted
The fifth parameter specifies that XMP is leading
The order of handling is in that exact order. Btwl the Image Details conversion uses True, True, True, False so exactly the same as this script
Hert
The second parameter specifies that the Tiff base tags should be converted
The third parameter specifies that Exif should be converted (maybe you should switch this off)
The fourth parameter specifies that IPTC should be converted
The fifth parameter specifies that XMP is leading
The order of handling is in that exact order. Btwl the Image Details conversion uses True, True, True, False so exactly the same as this script
Hert
This is a user-to-user forum. If you have suggestions, requests or need support then please send a message
Re: Re-Read some Metadata from NEF not from XMP
Thanks for the info!
Regards,
Michael
Regards,
Michael
PSUServer 2024.x, PostgreSQL 12.x
My homepage http://www.michaelweidner.com
My homepage http://www.michaelweidner.com
Re: Re-Read some Metadata from NEF not from XMP
Hert,IDimager wrote:Maybe this helps??
http://repository.idimager.com/cgi-bin/ ... 1cf5a2d130
Maybe you need to delete all the progress usage but it should get you started.
I'm jumping into this conversation a little late but I'm curious about the script. Why do you need to delete the progress stuff? Is it not supported in PSU? If so, is there some other way to display the progress of the script in PSU?
Also, if this script was used on jpeg files, would it work and just write embedded xmp to the file? Would it overwrite any xmp that already existed? Is that what "XMP is leading" refers to?
Tom Stoddard
Re: Re-Read some Metadata from NEF not from XMP
I tested this again with the "True, True, True, False" but the results are not the same! (copyrightnotice still missing)IDimager wrote: Btwl the Image Details conversion uses True, True, True, False so exactly the same as this script
Only if set the fifth parameter to True, the copyrightnotice is retained. So when specifying that "XMP is leading", only the missing tags will converted from exif to xmp?
It is not so simple...
After running the script, the file will go out-of-sync. I noticed the copyrightnotice was updated from the XMP in the file but the color label was not. Now, depending on how you sync:
Auto sync => the catalog information will be leading and the color label will overwritten to
Read Metadata from File => the xmp in the image file will be leading and color label will change in the catalog.
Lippe,
Photo Supreme V6, LR6, darktable, FPV, PSE14 - vaio i5 @ 2.5GHz + 8GB , 850 EVO 500GB - WD 1TB - Windows 10 Pro 64 bits- DS216play - EOS 600D
Re: Re-Read some Metadata from NEF not from XMP
Converting metadata to XMP for multiple images is now added to the .170 build. It is implemented in the thumb's context menu -> Metadata -> Convert Metadata to XMP
I couldn't find a feature request for this in Mantis. I was convinced that there was one created once by Weidmic, but I could be wrong.
I couldn't find a feature request for this in Mantis. I was convinced that there was one created once by Weidmic, but I could be wrong.
This is a user-to-user forum. If you have suggestions, requests or need support then please send a message