#include "l_bitmap.h"
L_LTKRN_API L_INT L_CopyBitmapHandle(pBitmapDst, pBitmapSrc, uStructSize)
Copies one bitmap handle to another. This function copies only the bitmap handle; it does not copy the actual image data.
Pointer to the bitmap handle referencing the destination bitmap.
Pointer to the bitmap handle referencing the source bitmap to copy.
Size in bytes, of the structure pointed to by pBitmapDst
, for versioning. Use sizeof(BITMAPHANDLE).
None.
The palette referenced by the hPalette field is not duplicated; the hPalette field is copied the same way as other fields in the bitmap handle.
Note that the destination bitmap does not have to be allocated for this function to work. Use L_CopyBitmapData to copy the contents of the image data from one bitmap to another.
Required DLLs and Libraries
Win32, x64, Linux.
For complete sample code, refer to the FEATURE1 example.
This example loads a temporary bitmap and copies its handle to
the new bitmap. Notice that TmpBitmap is not freed, because the new
bitmap handle references the original image data.
L_INT CopyBitmapHandleExample(pBITMAPHANDLE pBitmap)
{
L_INT nRet;
BITMAPHANDLE TmpBitmap; /* Bitmap handle for the initial image */
/* Load a bitmap at its own bits per pixel */
nRet = L_LoadBitmap (MAKE_IMAGE_PATH(TEXT("ImageProcessingDemo\\Image3.cmp")), &TmpBitmap, sizeof(BITMAPHANDLE), 0, ORDER_BGR, NULL, NULL);
if(nRet != SUCCESS)
return nRet;
/* Copy bitmap handle to the new bitmap */
if(pBitmap->Flags.Allocated)
L_FreeBitmap(pBitmap);
nRet = L_CopyBitmapHandle(pBitmap, &TmpBitmap, sizeof(BITMAPHANDLE));
if(nRet != SUCCESS)
return nRet;
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