
Change 256 bitmap to 16 bit using bitblt / vb
I use the following to create a B&W mask from any source. Most of this is
modified from stuff I got Mark Meanie's site (sprite routine tutorials). I
hope this is what you are looking for.
PS: I trimmed down the Xpost.
iMaskDC = CreateCompatibleDC(iSrcDC)
iMaskBM = CreateBitmap(34, 30, 1, 1, 0&)
iMaskBM = SelectObject(iMaskDC, iMaskBM)
lcolour = SetBkColor(iSrcDC, &HFFFFFF)
i = BitBlt(iMaskDC, 0, 0, 34, 29, iSrcDC, 0, 0, SRCCOPY)
Quote:
>Hi,
>I need to change the bitmap I capture from the screen (which is in 256
>color) to
>16bit so that I can then convert it into JPG using external dll/ocx.
>Anybody has suggestions as to how I can do this using winapi in vb?
>Or can I just capture the screen in 16bit irrespective of the original
>palette?
>Can somebody please post a sample code?
>Thanks
>Shaju