PC Review


Reply
Thread Tools Rate Thread

create Bitmap from rawbuffer(BYTE*)

 
 
Soja
Guest
Posts: n/a
 
      14th Aug 2003
How can i create a Bitmap from a rawbuffer-BYTE* (from framegrapper).

I do following:

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

pictureBox->set_Image(myBit2 );

the Bitmap were not correct displayed

MFC
Soja



 
Reply With Quote
 
 
 
 
Ken Alverson
Guest
Posts: n/a
 
      14th Aug 2003
"Soja" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> How can i create a Bitmap from a rawbuffer-BYTE* (from framegrapper).
>
> I do following:
>
> Bitmap *myBit2 = new
> Bitmap(wImage,hImage,wImage*sizeof(BYTE),PixelFormat::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


 
Reply With Quote
 
Soja
Guest
Posts: n/a
 
      14th Aug 2003
A read cross were displayed(nothing) and exception raise after
pictureBox->set_Image(myBit2);

System.InvalidOperationException


"Ken Alverson" <(E-Mail Removed)> schrieb im Newsbeitrag
news:(E-Mail Removed)...
> "Soja" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
> > How can i create a Bitmap from a rawbuffer-BYTE* (from framegrapper).
> >
> > I do following:
> >
> > Bitmap *myBit2 = new
> > Bitmap(wImage,hImage,wImage*sizeof(BYTE),PixelFormat::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
>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
byte[,,] to Bitmap? mallolnolla@gmail.com Microsoft C# .NET 5 11th Oct 2005 03:46 PM
Create Bitmap from byte[] gray levels Ondrej Sevecek Microsoft Dot NET Framework 0 23rd May 2005 03:31 PM
VB .NET Bitmap to byte array saima ashraf Microsoft Dot NET Compact Framework 1 31st Dec 2003 12:43 AM
Convert Bitmap to Byte and Byte to Bitmap Eka Gautama Microsoft C# .NET 2 11th Nov 2003 04:57 AM
create bitmap from byte* - pointer Soja Cender Microsoft Dot NET Compact Framework 1 20th Aug 2003 07:01 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 12:07 PM.