virtual L_SIZE_T LAnnContainer::SaveOffset(fd, nOffset, uFormat=ANNFMT_NATIVE, bSelected=TRUE, pSaveOptions=NULL)
Saves the specified annotations at a specified position in an existing file.
The Windows file handle of the file to save.
The offset within the specified file to embed the saved annotation file. For example, if you specify 5, then 5 bytes of other data will precede the embedded file.
Format for saving annotation data. Possible values are:
Value | Meaning |
---|---|
ANNFMT_NATIVE | [0x0000] Use LEAD's own format for annotations. NOTE: This format has been replaced by ANNFMT_XML, and is no longer supported. |
ANNFMT_WMF | [0x0001] Save the file in the Windows WMF format. |
ANNFMT_ENCODED | [0x0004] Save as a binary format. NOTE: This format has been replaced by ANNFMT_XML, and is no longer supported. |
ANNFMT_XML | [0x0005] Save the file in an XML text format. This is LEADs new text-based format which is upward-compatible. It should be used instead of ANNFMT_NATIVE. 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 LAnnotation::IsSelected and LAnnotation::SetSelected functions. |
FALSE | Save only the specified object. |
Pointer to a SAVEFILEOPTION structure that contains optional extended save options. This information is used to add annotation pages or replace annotation pages in a multipage annotation file. Pass NULL to save a one-page annotation file.
The size of the embedded file.
In version 15.0, the text based format ANNFMT_XML is replacing ANNFMT_NATIVE and ANNFMT_ENCODED. Note that ANNFMT_NATIVE and ANNFMT_ENCODED are no longer supported as options with LAnnContainer::Save, LAnnContainer::SaveOffset, and LAnnContainer::SaveMemory.
For backward compatibility, this latest version of LEADTOOLS can read the discontinued formats (ANNFMT_NATIVE and ANNFMT_ENCODED) with the following functions:
The ANNFMT_XML format offers many advantages over the older annotation formats:
It is both forward- and backward-compatible.
It is human readable.
It can be easily modified using a standard text editor (i.e. notepad.exe).
It can be easily parsed using any standard XML parser.
It can be used with any of the growing number of utilities that work with XML.
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 a container, set bSelected to TRUE.
To save all objects in a container, set bSelected to FALSE.
This function overwrites existing data at the specified location in the file. You can use this function to update an image that you loaded with the LAnnContainer::LoadOffset function. The offset is specified in bytes. You must open the file and get a Windows file handle before calling this function.
The information in the SAVEFILEOPTION structure can be used to add new pages or replace existing pages in a multipage annotation file of type ANNFMT_XML. Note that all the pages of an annotation multipage file must be all of type ANNFMT_XML. An annotation file cannot contain pages of different format types.
To insert new pages to an annotation multipage file:
To replace an existing page in an annotation multipage file:
To delete a page from an annotation multipage file, use LAnnContainer::DeletePage, LAnnContainer::DeletePageMemory, or LAnnContainer::DeletePageOffset.
Win32, x64.
For an example, refer to LAnnContainer::LoadOffset.
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