Home : Annotations : Storage : Save XMP annotation data into a TIFF file
Q10111 - INFO: Save XMP annotation data into a TIFF file

This article is for DotAnnotate 4.0 or earlier.  Instructions for version 5.0 and later can be found at http://www.atalasoft.com/KB/article.aspx?id=10220.

Use the Save method of the AnnotationController (or AnnotateViewer.Annotations) to get the annotation data.  Once you have the data, set the TiffEncoder.Xmp property and save the image.  Here is an example:

[C#]
// Save the annotation data to XMP format.
byte[] data = this.annotateViewer1.Annotations.Save();

// Add the XMP data to a TiffEncoder.
Atalasoft.Imaging.Codec.TiffEncoder tif = new Atalasoft.Imaging.Codec.TiffEncoder();
tif.Xmp = data;

// Save the file.
this.annotateViewer1.Save(@"C:\myfile.tif", tif);

--------------------------------------------------------------

[Visual Basic]
' Save the annotation data to XMP format.
Dim data() As Byte =  Me.annotateViewer1.Annotations.Save()
 
' Add the XMP data to a TiffEncoder.
Dim tif As Atalasoft.Imaging.Codec.TiffEncoder =  New Atalasoft.Imaging.Codec.TiffEncoder()
tif.Xmp = data
 
' Save the file.
Me.annotateViewer1.Save("C:\myfile.tif", tif)

Related Articles
No Related Articles Available.

Article Attachments
No Attachments Available.

Related External Links
No Related Links Available.
Help us improve this article...
What did you think of this article?

poor 
1
2
3
4
5
6
7
8
9
10

 excellent
Tell us why you rated the content this way. (optional)
 
Approved Comments...
No user comments available for this article.

Powered By InstantKB.NET v1.3
Copyright © 2002, 2017. InstantASP Ltd. All Rights Reserved