exception in bitmap(stream*) constructor

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

    exception in bitmap(stream*) constructor


    Hallo,

    i have following problem

    I dry to create a Bitmap from Byte[], i use the Bitmap(Stream*) constructor,
    but a exception rise there

    Code:

    unsigned char dest __gc[] = new unsigned char __gc[1024*1280];

    Marshal::Copy(p image,dest,0, 1024*1280 );

    MemoryStream * mem = NULL;

    mem = new MemoryStream(de st);

    MemoryStream * str = new MemoryStream();

    int size = 1024*1280;

    str->Write(dest, 0, size);

    System::Drawing ::Image *image = NULL;

    image = new Bitmap(str);

    Bitmap bmp = new Bitmap(mem );


Working...