virtual L_INT LBitmap::Add (pBitmapList, uFlags=BC_ADD)
Adds or averages the bitmaps in a list and the class object's bitmap. The class object's bitmap is updated with the resulting bitmap.
Pointer to an LBitmapList object that contains a list of bitmaps.
Flag that indicates the operation to perform. Possible values are:
|BC_AVG||[0x0001] Average the bitmaps in the specified list.|
|BC_ADD||[0x0002] Add the bitmaps in the specified list.|
|SUCCESS||The function was successful.|
|< 1||An error occurred. Refer to Return Codes.|
This operation can be used to add several images of the same view to improve the lightness or brightness of the image. It can also eliminate the random noise contained in these images by doing an average of all bitmaps.
This function performs operations between data byte-by-byte. An image can be any color resolution.
Bitmap object is assumed to be empty. If Bitmap contains a bitmap, you should free it prior to calling this function. LBitmap::Add will allocate and store the resulting bitmap in Bitmap object. The image resulting from this operation is internally copied from the first image in the list, before performing the adding operation.
The operations are performed based on the smallest width and height of the input images.
To update a status bar or detect a user interrupt during execution of this function, refer to LBase::EnableStatusCallback.
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 toolkits.
This function does not support 32-bit grayscale images. It returns the error code ERROR_GRAY32_UNSUPPORTED if a 32-bit grayscale image is passed to this function.
The sign flag in the BITMAPHANDLE structure must be the same for all images listed. That is, all images must be either signed or unsigned.
L_INT LBitmap__AddExample(LBitmap & Bitmap, L_TCHAR * szFile)
for (L_INT i = 1; i < 4; i++)
nRet =TempBitmap.Rotate(7500 * i, ROTATE_RESAMPLE, RGB(255, 0, 0));
nRet =Bitmap.Add(&BitmapList, BC_AVG);
Medical Web Viewer .NET
.NET, Java, Android, and iOS/macOS Assemblies
C API/C++ Class Libraries