Tip of the day: Change EXIF metadata
dim file as FolderItem = SpecialFolder.Desktop.Child("test.jpg")
// use XMPFilesMBS to open file
dim flags as integer = XMPFilesMBS.kOpenForUpdate
dim xf as new XMPFilesMBS(file, XMPFilesMBS.kUnknownFile, flags)
// now read the metadata
dim xmp as new XMPMetaMBS
dim PacketInfo as XMPPacketInfoMBS
dim xmppacket as string
if xf.GetXMP(xmp, xmppacket, PacketInfo) then
// set a value like here a different GPS altitude
xmp.SetProperty xmp.kNS_EXIF, "GPSAltitude", "24695/43"
// update file
if xf.CanPutXMP(xmp) then
xf.PutXMP(xmp)
xf.CloseFile(XMPFilesMBS.kUpdateSafely)
else
MsgBox "Can't update."
end if
end if