Change 256 bitmap to 16 bit using bitblt / vb 
Author Message
 Change 256 bitmap to 16 bit using bitblt / vb

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



Mon, 02 Jul 2001 03:00:00 GMT  
 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



Mon, 02 Jul 2001 03:00:00 GMT  
 Change 256 bitmap to 16 bit using bitblt / vb
This Mark Meanie site sounds cool. Where is it?



Quote:
> 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)


> >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



Tue, 03 Jul 2001 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Change 256 bitmap to 16 bit using bitblt / vb

2. Change 256 bitmap to 16 bit using bitblt / vb

3. Bitmap Color Palette editing-VB4 16 bit 256 color

4. Bitmap Color Palette editing-VB4 16 bit 256 color

5. Howto change 24 bit bitmap into 8 bit bitmap in vb

6. HELP - detecting if windows in 256 or 16-bit color modes

7. corruption of 16 bit db when used by both 16 and 32 bit apps

8. Compiling a 16-bit executable using 32-bit VB.

9. Using 16-bit dll's in 32-bit VB

10. VB 4.0 (16-Bit)/Crystal Reports 3.0.1.32 (16-Bit) Print Preview Maximize Window

11. How do I Change the color of a bitmap using API (BITBLT or SetDIBit)

 

 
Powered by phpBB® Forum Software