
|
String sourFileName = "test.tif"; String destFileName = "testOut.tif"; // load the source tiff file int hDib = axBITiff1.LoadTiffIntoDIB(sourFileName, 0, false); // get the size of the image int width = axBIDIB1.GetDIBWidth(hDib); int height = axBIDIB1.GetDIBHeight(hDib); // set the background bitmap size axBiAnno1.AnnoUISetExtent(width, height); // create the text annotation object axBiAnno1.CreateAnnoObj((short)BIANNOLib.ObjectType.aotText); // set the text annotation object axBiAnno1.AnnoObjSetPos(10, 10); axBiAnno1.AnnoObjSetSize(width, 800); axBiAnno1.AnnoObjSetColor(0); axBiAnno1.AnnoObjSetText("Test Test Test Test Test Test Test"); axBiAnno1.AnnoObjSetFont(100, 50, 0, 0, 100, false, false, false, 0, 0, 0, 0, 0, "Arial"); // burn the text into the image int nNewDib = axBiAnno1.AnnoBurnin(hDib); // delete annotation objects from the page axBiAnno1.DeleteObjectsFromPage(0); // save the modified image axBITiff1.SaveDIBInTiffFormat(destFileName, nNewDib, (short)BITIFFLib.enumCompressionTypes.TCOMP_NOCOMP, false); |
|
Figure 1 |