Saving the annotation in the image

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

 

 

[C++]

void BurninTiffPage(LPCTSTR szFileName, long page) {

// Load DIB and annotation

HDIB hDib = LoadTiffIntoDIB(szFileName, page, FALSE);

INT_PTR pAnno = LoadAnnotationFromTiff(szFileName, 0);

 

// Burn in and remove annotation from the page

HDIB hNewDib = AnnoBurnin(pAnno, hDib);

AnnoDeleteObjectsFromPage(pAnno, page);

 

// Save the image and the annotation

InsertTiffImage(szFileName, hNewDib, page, TCOMP_LZW, FALSE, 1, page, FALSE, TRUE);

SaveAnnotationIntoTiff(szFileName, pAnno, 0);

 

// Free resources

DestroyAnnoHandle(pAnno);

GlobalFree(hDib);

}

 

[VB.NET]

Private Sub Burn()

Dim hTmpDib As Long

hTmpDib = ActiveForm.Anno.AnnoBurnin(ActiveForm.BiDisp.hDib)

 ‘ Save the hTmpDib to the file

End Sub