This method saves the annotation information to the annotation file.

[Visual Basic] Public Function SaveAnnotationFile() As Boolean
[C#] public bool SaveAnnotationFile();

Parameters

None

Return Value

Returns True if successful, otherwise returns False.

Explanation

The SaveAnnotationFile method saves the information for all of the annotation objects drawn on the ImageKit Control's base image. This annotation information is saved in xml format into an annotation file according to the file name and path set in the AnnotationFileName property. Eventhough the annotation file is in xml format, the file extention does not have to be ".xml" but can be any extention of your choosing.

Files saved with the SaveAnnotationFile method can be loaded using the LoadAnnotationFile method which will redraw all of the annotation objects on top of the base image in the ImageKit Control.

Note: The annotation objects defined in the annotation file are independent of the image on which they are displayed. It is possible to load an annotation file onto a base image that is different from the image that was displayed when the annotation file was created.

Important: When an annotation file is saved, if the Image object is among the annotation objects being used, then a copy of the image that is being pasted in the Image object is made and saved in the same directory as the annotation file. When that annotation file is loaded, the copied image is the image displayed in the Image object. If the SaveAnnotationSelectedObjects property is True when this method is executed then only the objects selected at that time will be saved into the annotation file.

If you deploy an annotation file to another PC, simply deploy the copied image along with the annotation file and the Image object will display it with the need to adjust the path to the image used by the Image object. You can see how this is done by looking at the Image object's information in the saved annotation file. You will see that only the filename of the image used by the Image object is saved in the annotation file. If you edit this information by adding a path to a different image, that path will be used and that image will be loaded into the Image object.

If an image of the same name already exists in the folder where you are saving the annotation file, then that image will be overwritten.

If you are using multiple Image annotation objects and they load images from different directories but the images have the same filename, then the copied images will be saved with the following string appended to their filename:

"_**"

where ** is a two digit number starting from "01" up to "99".

See also

ImageKit.Edit Members | Newtone.ImageKit.Wpf.ImageKit

 

The ImageKit WPF is created by Newtone Corporation