Try the following code:
/********************************/
BITMAPHANDLE LeadBitmap; /* Bitmap handle to hold the loaded image*/
BITMAPHANDLE TmpBitmap; /* Temporary bitmap */
int XDst; /* Column offset of the destination */
int XSize; /* Pixel width of the rectangle to combine */
int YDst; /* Row offset of the destination */
int YSize; /* Pixel height of the rectangle to combine */
int XSrc; /* Column offset of the source */
int YSrc; /* Column offset of the source */
/* Load both bitmaps, at 24 bits per pixel */
L_LoadBitmap (TEXT("c:\\TempFiles\\OCR1.TIF"), &LeadBitmap, sizeof(BITMAPHANDLE), 24, ORDER_BGR, NULL, NULL);
L_LoadBitmap (TEXT("c:\\TempFiles\\eye.gif"), &TmpBitmap, sizeof(BITMAPHANDLE), 24, ORDER_BGR, NULL, NULL);
/* Specify a position in the top left part of the displayed image */
XDst = BITMAPWIDTH(&LeadBitmap) / 8;
YDst = BITMAPHEIGHT(&LeadBitmap) / 8;
/* Use the full size of the source bitmap */
YSize = BITMAPHEIGHT(&TmpBitmap);
XSize = BITMAPWIDTH(&TmpBitmap);
XSrc = 0;
YSrc = 0;
/* Combine TmpBitmap with LeadBitmap, using flags for an ordinary paste */
L_CombineBitmap(&LeadBitmap, XDst, YDst, XSize, YSize,
&TmpBitmap, XSrc, YSrc, CB_OP_ADD | CB_DST_0);
/*Save LeadBitmap*/
L_SaveBitmap(TEXT("c:\\TempFiles\\LeadBitmap.TIF"), &LeadBitmap, FILE_TIF, 24, 0, NULL);
/* Free the temporary bitmap */
L_FreeBitmap (&TmpBitmap);
/********************************/
Thanks,
Maen Badwan
LEADTOOLS Technical Support