L_AnnLoadMultiOffset (original) (raw)
Summary
Loads annotations from a position within a file. This enables you to load an annotation file that is embedded in another file.
Syntax
#include "l_bitmap.h"
L_LTANN_API L_INT L_AnnLoadMultiOffset(fd, nOffset, nLength, phObjects, nCount, pnItemsRead, pLoadOptions)
Parameters
L_HFILE fd
The Windows file handle of the file to load.
L_SSIZE_T nOffset
The position, from the beginning of the file, of the first byte to load. (The byte count starts at zero.)
L_SIZE_T nLength
The number of bytes of annotation data to read from the file. If you saved the offset using L_AnnSaveMultiOffset, the variable pointed to by puSizeWritten in that function contains the length of data saved. If you do not know the length of the data, pass 0xFFFFFFFF for this parameter.
pHANNOBJECT phObjects
Pointer to an array that will receive the annotation container objects.
L_INT nCount
Size of the phObjects
array.
L_INT *pnItemsRead
Pointer to an L_INT that will receive the count of annotation containers successfully read.
pLOADFILEOPTION pLoadOptions
Pointer to optional extended load options. Pass NULL because this parameter is currently ignored.
Returns
Value | Meaning |
---|---|
SUCCESS | The function was successful. |
< 1 | An error occurred. Refer to Return Codes. |
Comments
To use this function:
- Call the L_AnnLoadMultiOffset function and pass NULL for
phObjects
, and 0 fornCount
. - The required size of the array phObjects array is returned in the L_INT pointed to by
pnItemsRead
. - Allocate an array of HANNOBJECT that can hold *pnItemsRead.
- Call the L_AnnLoadMultiOffset function a second time, and pass the allocated array for phObjects.
This function loads all pages of a multipage annotation file starting at a given offset, into an array. Each consecutive page of the multipage annotation file corresponds to one annotation container, and is loaded into consecutive slots of the array. If the annotation file contains many pages, then this method will load the multipage annotation file much faster than repeated calls to L_AnnLoad. Note that this function only loads annotation files that use the ANNFMT_XML format.
Required DLLs and Libraries
- LTANN
- For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.
Platforms
Win32, x64.
See Also
Functions
- L_AnnDeletePage
- L_AnnDeletePageMemory
- L_AnnDeletePageOffset
- L_AnnFileInfo
- L_AnnFileInfoMemory
- L_AnnFileInfoOffset
- L_AnnLoad
- L_AnnLoadMemory
- L_AnnSave
- L_AnnSaveMemory
- L_AnnSaveOffset
- L_AnnSetOptions
- L_AnnGetOptions
Topics
- Annotation Files
- Annotation Functions: Input and Output
- Implementing Annotations
- Implementing an Automated Annotation Program
- Implementing a Non-automated Annotation Program
- Annotation Features
- Annotation Functions: Loading Annotation Files
Example
For an example, refer to L_AnnSaveMultiOffset
LEADTOOLS Raster Imaging C API Help