DIB to Image

  • Thread starter Thread starter Jean Christophe Avard
  • Start date Start date
J

Jean Christophe Avard

Hi! I am designing a Drag and Drop features. I want to drag Image from Corel Designer into my application. I can't figure this out. I have e.Data.getData(DataFormats.Dib) that is a stream, but when I try Image.FromStream(e.Data.getData(DataFormats.Dib)) I get Invalid Cast error... I tried it ALL!!! I can't figure out how to do this, and I HAVE to... Anyone has ever dealt with this!? Any help really appreciated! Thank you!!!

Jean Christophe Avard
 
Hi,

Check out the gdi+ function gdipcreatebitmapfromgdidib function.
Unfortunately you have to make an api call to use it. Maybe that will help.

http://pinvoke.net/default.aspx/gdiplus.GdipCreateBitmapFromGdiDib


Ken
---------------------
Hi! I am designing a Drag and Drop features. I want to drag Image from Corel
Designer into my application. I can't figure this out. I have
e.Data.getData(DataFormats.Dib) that is a stream, but when I try
Image.FromStream(e.Data.getData(DataFormats.Dib)) I get Invalid Cast
error... I tried it ALL!!! I can't figure out how to do this, and I HAVE
to... Anyone has ever dealt with this!? Any help really appreciated! Thank
you!!!

Jean Christophe Avard
 
Back
Top