ShiftData example for C++ Builder
void __fastcall TForm1::Button1Click(TObject *Sender)
{
/* Load the bitmaps */
LEADImage1->Load("e:\\image1.cmp", 0, 1, 1 );
LEADImage2->Load ("e:\\image2.cmp", 0, 1, 1 );
LEADImage2->GrayScale (16);
/* Move 5 bits starting from bit 2 into the high bits of the destination bitmap */
LEADImage1->ShiftData( LEADImage2->Bitmap, 2 /* uSrcLowBit */,6 /* uSrcHighBit*/,3 /* uDstLowBit */,8 /* uDstBitsPerPixel */ );
}