i have GDPIcture.net dll 8.5.28. i want to load annotation xmp file using LoadAnnotationsFromXMP() method in GDViewer control. i had tried belwo code but it is not working
Code: Select all
OpenFileDialog OpenFileDialog1 = new OpenFileDialog();
OpenFileDialog1.Title = "Save Annotations As XMP";
OpenFileDialog1.CheckFileExists = false;
OpenFileDialog1.Filter = "XMP|*.xmp";
if (OpenFileDialog1.ShowDialog(this) == DialogResult.OK)
{
string FilePath = OpenFileDialog1.FileName;
if (gdViewer1.LoadAnnotationsFromXMP(FilePath) != GdPictureStatus.OK)
{
MessageBox.Show("Can't load annotations from " + FilePath);
}
}
Code: Select all
SaveFileDialog SaveFileDialog1 = new SaveFileDialog();
SaveFileDialog1.Title = "Save Annotations As XMP";
SaveFileDialog1.CheckFileExists = false;
SaveFileDialog1.OverwritePrompt = false;
SaveFileDialog1.Filter = "XMP|*.xmp";
if (SaveFileDialog1.ShowDialog(this) == DialogResult.OK)
{
string FilePath = SaveFileDialog1.FileName;
if (gdViewer1.SaveAnnotationsToXMP(FilePath) == GdPictureStatus.OK)
{
MessageBox.Show("Annotations succefully saved as XMP in " + FilePath);
}
else
{
MessageBox.Show("Can't save annotations in " + FilePath);
}
}
Please help me to solve this problem.
Thanks