|
-
February 1st, 2010, 06:52 PM
#1
How to display a InteropBitmap in a Windows Form
I haven't used C# in awhile. So, to get back into it I am writing an application using CLEyeCamera API for the PS3 Eye Toy. The API returns a InteropBitmap. I want to display the image in a panel. I would normally do this by overriding the paint event and using e.Graphics.DrawImage();
What is the right way to go about displaying this in C#?
KTNXBYE
-
February 1st, 2010, 07:25 PM
#2
Re: How to display a InteropBitmap in a Windows Form
I have never done this, but glancing at the documentation for the InteropBitmap class I see a method named "CopyPixels" which may be used to copy the pixel data into an array. Once you have that array you essentially have all that you need and can create a Bitmap object in a number of ways. Here are a few of them (saves me the typing )
http://www.vbforums.com/showthread.php?t=358917
-
February 1st, 2010, 10:45 PM
#3
Re: How to display a InteropBitmap in a Windows Form
Well, this solution semiworks. I still have to mess around with parameters to see what bitmap format it is in. The only problem is that the windows encounters a flickering problem because I have to repaint the window every time the image changes.
KTNXBYE
-
February 2nd, 2010, 02:02 AM
#4
Re: How to display a InteropBitmap in a Windows Form
You should be double buffering if you need to repaint very often. As for the format... the API should have that documented, no?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|