We have wrote the test code as below, we only try to get the value with ‘schemes.DublinCore.Source’ and save the format to the destination path, and we not get any exception, but the TIF file is damaged. (We are using the latest API 17.9.0)
using GroupDocs.Metadata;
using GroupDocs.Metadata.Formats.Image;
using GroupDocs.Metadata.Xmp;
using System;
using System.Windows.Forms;
namespace MetadataTest
{
class Program
{
static void Main(string[] args)
{
string licenseFilePath = @“C:\Users\User\Desktop\MetadataTest\MetadataTest\MetadataTest\License\GroupDocs.Metadata.lic”;
string sourcePath = @“C:\Users\User\Desktop\MetadataTest\MetadataTest\MetadataTest\Source\Flowerboy_orginal.tif”;
string destinationPath = @“C:\Users\User\Desktop\MetadataTest\MetadataTest\MetadataTest\Destination\Flowerboy_orginal.tif”;
License lic = new License();
lic.SetLicense(licenseFilePath);
TiffFormat format = new TiffFormat(sourcePath);
if (format == null)
{
return;
}
try
{
XmpSchemes schemes = format.XmpValues.Schemes;
if (schemes == null)
{
return;
}
if (schemes.DublinCore.Source != null)
{
string str = schemes.DublinCore.Source;
}
format.Save(destinationPath);
}
catch(Exception e)
{
MessageBox.Show(e.InnerException.Message.ToString());
}
}
}
}
damaged.PNG (29.8 KB)
test tif.zip (886.5 KB)