December Developer Newsletter

Text Box: The Annotation SDK provides three different possibilities for saving your annotations:

Annotations can be saved to a separate file.
Annotations can be saved (burned) directly into the image. No modifications can be done after this.
Annotations can be saved into tiff file tags. The annotations can be modified later.
 
Letís see the details of these different methods:

Saving the annotation into a separate file

An annotation can be saved into a separate annotation file with the file extension of ďannĒ. All parameters of the objects are saved in the order of creation. The saved annotation file can be loaded programmatically when the image is opened.
Use the AnnoSaveToFile method of the BiAnno.ocx for this saving method. You will need to specify the filename in which the annotations are saved.

Saving the annotation into the image

If the annotation is burned into the image, the resulting image is a device dependent bitmap (DDB) or device independent bitmap (DIB). This image can be saved in any file format by using the Annotation SDK/ActiveX.

Use the AnnoBurnin method of the BiAnno.ocx for this saving method. This method requires a DIB, and returns another DIB that contains the burned annotation objects.

Saving the annotation in a TIFF file

The annotation can also be saved in the TIFF file header as a standard TIFF data tag. Different methods exist in the BiAnno.ocx to add annotations to the TIFF file:

If you want to simply save all the annotations to the TIFF file, use the AnnoSaveToTiff method. You should specify filename and the tag number. This method will overwrite annotation objects in the TIFF file.

The AnnoSaveToTiffExt method gives you more possibilities. You can choose to overwrite or append annotation objects in the TIFF file. For example a DIB and annotations need to be saved to a TIFF file. If the file already exists you can append the annotations to the file. The method collects annotation objects that are on the current page, and appends them to the TIFF file.

Page 3

Text Box: How to Save Annotations