By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,815 Members | 1,143 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,815 IT Pros & Developers. It's quick & easy.

DIB to Image

P: n/a
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
Nov 21 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
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/gdip...tmapFromGdiDib
Ken
---------------------
"Jean Christophe Avard" <NO***@M.BITCH> wrote in message
news:eI**************@TK2MSFTNGP15.phx.gbl...
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
Nov 21 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.