The annotation can also be saved in the TIFF file header as a standard TIFF data tag. There are methods in the BiAnno.ocx to add annotations to the TIFF file.
If you want to simply save all annotations to the TIFF use the AnnoSaveToTiff method. You should specify filename and the tag number for this method. This method will overwrite annotation objects in the TIFF file.
Private Sub AnnoSave(fileName As String)
If fileName <> ‘‘ then
ActiveForm.Anno. AnnoSaveToTiff (fileName, 0)
End If
End Sub
The AnnoSaveToTiffExt method gives more possibilities. You can overwrite or append annotation objects in the TIFF file.
For example there are a DIB and annotations to save to a TIFF file. If the file already exists you can append the annotations to the file:
Private Sub AnnoSave(fileName As String)
…
‘ Save the DIB to the file. If fileName is already exists, the DIB will be appended to the image
RetVal = ActiveForm.BiTiff.SaveDIBInTiffFormat(fileName, hDib, 0, True)
…
if RetVal Then
iImages = ActiveForm.BiTiff.GetNumberOfImagesInTiffFile(fileName)
ActiveForm.Anno.AnnoSaveToTiffExt(fileName, 0, SAVE_ANNO_APPEND,
curimage, iImages - 1)
End If
End Sub
The method collects annotation objects that are on the curimage page, and appends to the TIFF file. The iImages - 1 means that the objects will be displayed on the last page when the TIFF is loaded.