Burn Annotations to an Image programatically

  Imaging Toolkit

1. You can verify if there are annotation objects in the image with the AnnoLoadFromTIFF method. If this method returns FALSE, the image doesn’t contain annotation objects.
2. Before burning (after loading image and annotations) you have to set some annotation properties. If you don’t do that, the annotation object will not burn into the image correctly.

// Set page DPI
biAnno.AnnoSetDPI(dib);
// Set page size
biAnno.AnnoUISetExtent(biDIB.GetDIBWidth(dib), biDIB.GetDIBHeight(dib));
// Select annotation page
biAnno.AnnoSelectPage(0);

3. If you want to use the AnnoObjSelectNext method to verify that there are annotation objects in the image, you have to use the biAnno.AnnoObjDeselect(0) method before calling the AnnoObjSelectNext method.
The AnnoObjDeselect method deselects the last selected annotation object, so the AnnoObjSelectNext method will select the first object on the page.

Regards,
Technical Support Team