#include "l_bitmap.h"
L_LTKRN_API L_INT L_CopyBitmap(pBitmapDst, pBitmapSrc, uStructSize)
Copies an entire image of a source bitmap and places it into a destination bitmap. This also copies all fields in the bitmap handle.
Points to the destination bitmap handle to hold the copied image.
Points to the source bitmap handle. You must have a valid image loaded into the bitmap for this function to work.
Size in bytes, of the structure pointed to by pBitmapDst
, for versioning. Use sizeof(BITMAPHANDLE).
Value | Meaning |
---|---|
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. If the bitmap is already allocated, you must free it.
If a region is defined for the bitmap, the region is also copied.
Required DLLs and Libraries
Win32, x64, Linux.
For complete sample code, refer to the CHILD.C module of the DEMO
example.
This example loads TmpBitmap and copies it to LeadBitmap.
L_INT CopyBitmapExample(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 the temporary bitmap to the new bitmap */
if(pBitmap->Flags.Allocated)
L_FreeBitmap(pBitmap);
nRet = L_CopyBitmap(pBitmap, &TmpBitmap, sizeof(BITMAPHANDLE));
if(nRet != SUCCESS)
return nRet;
/* Clean up */
if(TmpBitmap.Flags.Allocated)
L_FreeBitmap(&TmpBitmap);
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