create Bitmap from rawbuffer(BYTE*)

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Soja

    #1

    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,h Image,wImage*si zeof(BYTE),Pixe lFormat::Format 8bppIndexed
    ,(IntPtr)pbyteB uffer);

    pictureBox->set_Image(myBi t2 );

    the Bitmap were not correct displayed

    MFC
    Soja



  • Ken Alverson

    #2
    Re: create Bitmap from rawbuffer(BYTE* )

    "Soja" <soja666@web.de > wrote in message
    news:e9cGBhmYDH A.1748@TK2MSFTN GP12.phx.gbl...[color=blue]
    > How can i create a Bitmap from a rawbuffer-BYTE* (from framegrapper).
    >
    > I do following:
    >
    > Bitmap *myBit2 = new
    > Bitmap(wImage,h Image,wImage*si zeof(BYTE),Pixe lFormat::Format 8bppIndexed
    > ,(IntPtr)pbyteB uffer);
    >
    > pictureBox->set_Image(myBi t2 );
    >
    > the Bitmap were not correct displayed[/color]

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

    Ken


    Comment

    • Soja

      #3
      Re: create Bitmap from rawbuffer(BYTE* )

      A read cross were displayed(nothi ng) and exception raise after
      pictureBox->set_Image(myBi t2);

      System.InvalidO perationExcepti on


      "Ken Alverson" <Ken@Alverson.n et> schrieb im Newsbeitrag
      news:epXcBpmYDH A.1736@TK2MSFTN GP10.phx.gbl...[color=blue]
      > "Soja" <soja666@web.de > wrote in message
      > news:e9cGBhmYDH A.1748@TK2MSFTN GP12.phx.gbl...[color=green]
      > > How can i create a Bitmap from a rawbuffer-BYTE* (from framegrapper).
      > >
      > > I do following:
      > >
      > > Bitmap *myBit2 = new
      > > Bitmap(wImage,h Image,wImage*si zeof(BYTE),Pixe lFormat::Format 8bppIndexed
      > > ,(IntPtr)pbyteB uffer);
      > >
      > > pictureBox->set_Image(myBi t2 );
      > >
      > > the Bitmap were not correct displayed[/color]
      >
      > Perhaps if you told us how it was being displayed. Wrong colors? Upside
      > down? Backwards? Not the image at all (garbage)?
      >
      > Ken
      >
      >[/color]


      Comment

      Working...