469,299 Members | 2,132 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,299 developers. It's quick & easy.

create Bitmap from rawbuffer(BYTE*)

How can i create a Bitmap from a rawbuffer-BYTE* (from framegrapper).

I do following:

Bitmap *myBit2 = new
Bitmap(wImage,hImage,wImage*sizeof(BYTE),PixelForm at::Format8bppIndexed
,(IntPtr)pbyteBuffer);

pictureBox->set_Image(myBit2 );

the Bitmap were not correct displayed

MFC
Soja

Nov 16 '05 #1
2 2004
"Soja" <so*****@web.de> wrote in message
news:e9**************@TK2MSFTNGP12.phx.gbl...
How can i create a Bitmap from a rawbuffer-BYTE* (from framegrapper).

I do following:

Bitmap *myBit2 = new
Bitmap(wImage,hImage,wImage*sizeof(BYTE),PixelForm at::Format8bppIndexed
,(IntPtr)pbyteBuffer);

pictureBox->set_Image(myBit2 );

the Bitmap were not correct displayed


Perhaps if you told us how it was being displayed. Wrong colors? Upside
down? Backwards? Not the image at all (garbage)?

Ken
Nov 16 '05 #2
A read cross were displayed(nothing) and exception raise after
pictureBox->set_Image(myBit2);

System.InvalidOperationException
"Ken Alverson" <Ke*@Alverson.net> schrieb im Newsbeitrag
news:ep**************@TK2MSFTNGP10.phx.gbl...
"Soja" <so*****@web.de> wrote in message
news:e9**************@TK2MSFTNGP12.phx.gbl...
How can i create a Bitmap from a rawbuffer-BYTE* (from framegrapper).

I do following:

Bitmap *myBit2 = new
Bitmap(wImage,hImage,wImage*sizeof(BYTE),PixelForm at::Format8bppIndexed
,(IntPtr)pbyteBuffer);

pictureBox->set_Image(myBit2 );

the Bitmap were not correct displayed


Perhaps if you told us how it was being displayed. Wrong colors? Upside
down? Backwards? Not the image at all (garbage)?

Ken

Nov 16 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by biteme | last post: by
1 post views Thread by Angel Filev | last post: by
5 posts views Thread by Lance | last post: by
8 posts views Thread by gsmith | last post: by
4 posts views Thread by =?Utf-8?B?U2hhcm9u?= | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by zhoujie | last post: by
reply views Thread by suresh191 | last post: by
1 post views Thread by Geralt96 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.