This:
Image img = (Image)myBitmap;
DOES NOT WORK!I did find a way to do this in one line of code. Many of the solutions I saw were 50+ lines of code, and most assumed you were saving the bitmap to a file first, which I did not want to do.
Image img = Image.FromHbitmap(bmp.GetHbitmap());
...
Bryan Valencia is a contributing editor and founder of Visual Studio Journey. He owns and operates Software Services, a web design and hosting company in Manteca, California.
No comments:
Post a Comment