L_LTANN_API L_INT L_AnnRealize(pBitmap, prcBounds, hObject, fRedactOnly)
Applies the specified annotation objects to a bitmap, altering the bitmap, itself.
Pointer to the bitmap handle referencing the bitmap to update.
Pointer to the Windows RECT structure that specifies the bounding rectangle where the annotations will be drawn.
You can pass NULL for the default, which matches the bitmap by specifying left = 0, top = 0, right = bitmap width, and bottom = bitmap height.
Handle to the annotation object.
Flag that indicates which objects to realize. Possible values are:
|TRUE||Realize only redaction objects|
|FALSE||Realize any visible object.|
|SUCCESS||The function was successful.|
|< 1||An error occurred. Refer to Return Codes.|
If you specify a container object, all annotations in the container are realized. You can specify redaction only if you only want to realize redaction objects, which are used for hiding information.
If you realize a redact object, moving the redact object will leave the original location of the redact object hidden. To restore the image under the redact object (so that when you move the redact object, the underlying image is not hidden), you must unrealize the redact object by calling L_AnnUnrealize.
This function is implemented by treating the bitmap as a device context and drawing the annotations in the device context.
When you call L_AnnRealize with
fRedactOnly set to TRUE, the background behind the redact object is saved into the redact object. That background info is saved together with the object and can be restored later with L_AnnUnrealize. If a REDACT object has a bitmap already, then the background is not saved. The background is saved inside locked objects, too. This way, complete security can be implemented. If it is desired for some portion of the image to be hidden, a REDACT object can be placed on top and L_AnnRealize with fRedactOnly set to true can be called. The bitmap under the object is changed and that portion is saved inside the Redact object. Next, the object is locked and saved together with the bitmap. To restore the original image, the redact objects have to be unlocked with the correct key and then L_AnnUnrealize must be called each time a Redact object is unlocked.
Encryptor objects cannot be realized. The encryptor is the only annotation object that cannot be realized.
This function works only for 1, 4, 8, 16, and 24-bit images. When using an image that has some other number of bits per pixel, call L_ColorResBitmap to change the image to a supported bits per pixel before calling L_AnnRealize.
Required DLLs and Libraries
For complete sample code, refer to the ANNOTATE example.
This example realizes all objects, using the default rectangle.
L_INT AnnRealizeExample(HANNOBJECT hAnnObject, pBITMAPHANDLE pBitmap)
HANNOBJECT RootContainer; /* Root container */
/* Get the root container */
nRet = L_AnnGetTopContainer(hAnnObject, &RootContainer);
if(nRet != SUCCESS)
/* Realize all objects */
nRet = L_AnnRealize(pBitmap, NULL, RootContainer, FALSE);
if(nRet != SUCCESS)
Medical Web Viewer .NET
.NET, Java, Android, and iOS/macOS Assemblies
C API/C++ Class Libraries