L_LTIMGKRN_API L_INT L_ImgKrnCopyImage(srcBitmap, destBitmap, structSize)
Copies an entire image of a source bitmap and places it into a destination bitmap. This also copies all fields in the bitmap handle.
Pointer to the source bitmap handle. A valid image must be loaded into the bitmap for this function to work.
Pointer to the destination bitmap handle to hold the copied image.
Size in bytes, of the structure pointed to by
destBitmap, for versioning. Use sizeof(BITMAPHANDLE).
|SUCCESS||The function was successful.|
|< 1||An error occurred. Refer to Return Codes.|
The destination bitmap must not be allocated before this function is called.
This function supports 12- and 16-bit grayscale and 48- and 64-bit color images. Support for 12- and 16-bit grayscale and 48- and 64-bit color images is available only in the Document/Medical Imaging toolkits.
This function supports unsigned data images, but not signed ones.
This function does not support 32-bit grayscale images.
Note: All functions with the L_ImgKrn prefix modify the underlying properties of the input BITMAPHANDLE, including but not limited to:
To avoid BITMAPHANDLE property fidelity loss, pass a copy of your BITMAPHANDLE to all L_ImgKrn* functions.
Required DLLs and Libraries
Win32, x64, Linux.
This example loads a bitmap and copies it to a Kernel LeadBitmap.
L_INT ret = SUCCESS;
BITMAPHANDLE srcBitmap; /* Bitmap handle to hold the loaded image. */
BITMAPHANDLE resultBitmap; /* Resulting bitmap */
/* Load the bitmap, keeping the bits per pixel of the file */
ret = L_LoadBitmap (MAKE_IMAGE_PATH(TEXT("IMAGE1.CMP")), &srcBitmap, sizeof(BITMAPHANDLE), 0, ORDER_BGR, NULL, NULL);
if(ret != SUCCESS)
// Copy the bitmap
ret = L_ImgKrnCopyImage(&srcBitmap, &resultBitmap, sizeof(BITMAPHANDLE));
// Free the bitmaps if the bitmaps no longer needed
if (ret == SUCCESS)
Medical Web Viewer .NET
.NET, Java, Android, and iOS/macOS Assemblies
C API/C++ Class Libraries