Skip to main content
Participant
January 22, 2026
Question

Adobe XMP Toolkit – Need help in add or modify XMP data to a file

  • January 22, 2026
  • 0 replies
  • 3 views
I am using the Adobe XMP Toolkit to add or modify XMP metadata in supported file formats.
 
Currently, when XMP data is written and CloseFile() is called, the toolkit creates a temporary file and then replaces the original file with this temp file. From my understanding, this replacement is handled internally (possibly via the DeriveTemp API).
 
Functionally, this works as expected. However, this approach is not ideal for my use case because when the original file is replaced the file attributes and permission are not same as previous.
 
What I am looking for is a method or recommended approach to update or replace XMP metadata directly in the same file
 
And also i found a method in TXMPFiles.incl_cpp. the method is:
 
#if XMP_StaticBuild // ! Client XMP_IO objects can only be used in static builds. 
XMP_MethodIntro(TXMPFiles,bool):: 
OpenFile ( XMP_IO *       clientIO, 
   XMP_FileFormat format /* = kXMP_UnknownFile */, 
   XMP_OptionBits openFlags /* = 0 */ ) 
WrapCheckBool ( ok, zXMPFiles_OpenFile_2 ( clientIO, format, openFlags ) ); 
return ok; 
#endif
 
Does this helps my requirement. And if so can you please help me with the implementation doc or any example to create XMP_IO * . The input from the user will be only filename and the flag.
 
Any clarification or guidance from the XMP Toolkit experts would be greatly appreciated.