Saves annotations in the specified file.
#include "ltwrappr.h"
virtual L_INT LAnnotationWindow::AnnSave(pszFile, nFormat=ANNFMT_XML, bSelected=FALSE)
Character string containing the name of the file to save.
Format for saving annotation data. Possible values are:
Value | Meaning |
---|---|
ANNFMT_NATIVE | NOTE: This format has been replaced with ANNFMT_XML. Annotation files can no longer be saved in this format. |
ANNFMT_WMF | Use the Windows WMF format. |
ANNFMT_ENCODED | NOTE: This format has been replaced with ANNFMT_XML. Annotation files can no longer be saved in this format. |
ANNFMT_XML | Use the XML format. This is the default value. |
Flag that indicates which objects to save. Possible values are:
Value | Meaning |
---|---|
TRUE | Save all objects that have the selected property set to TRUE. For getting and setting the selected property, use the LAnnContainer::GetSelectItems and LAnnotation::SetSelected functions. |
FALSE | Save only the specified object. |
Value | Meaning |
---|---|
SUCCESS | The function was successful. |
< 1 | An error occurred. Refer to Return Codes. |
Save annotations in the WMF format only for use in another application. LEADTOOLS reads annotations only in the native format.
To retain scaling and positioning information, this function always saves the root container, along with the specified object or selected objects. Use the bSelected parameter as follows:
To save only selected objects in the container, set bSelected to TRUE.
To save all objects in the container, set bSelected to FALSE.
For information on saving annotations as a tag in a TIFF file, refer to LAnnContainer::SaveTag.
Win32, x64.
L_INT LAnnotationWindow_AnnSaveExample(HWND hParentWnd)
{
L_INT nRet;
LAnnotationWindow MyLAnnotationWindow;
HWND hWnd=MyLAnnotationWindow.CreateWnd(hParentWnd);
if(hWnd!=NULL)
{
/*the function was successful */
/*do other processing*/
nRet = MyLAnnotationWindow.AnnSave(MAKE_IMAGE_PATH(TEXT("MyAnn.Ann")));
if(nRet==SUCCESS)
MessageBox(0, TEXT("Saving Annotations Successful"), TEXT("Saving Annotations Successful"),MB_OK);
else
return nRet;
}
else
{
/* there is an error */
return FAILURE;
}
return SUCCESS;
}
Help Collections
Raster .NET | C API | C++ Class Library | HTML5 JavaScript
Document .NET | C API | C++ Class Library | HTML5 JavaScript
Medical .NET | C API | C++ Class Library | HTML5 JavaScript
Medical Web Viewer .NET
Multimedia
Direct Show .NET | C API | Filters
Media Foundation .NET | C API | Transforms
Supported Platforms
.NET, Java, Android, and iOS/macOS Assemblies
Imaging, Medical, and Document
C API/C++ Class Libraries
Imaging, Medical, and Document
HTML5 JavaScript Libraries
Imaging, Medical, and Document