Okay, it's late at night and I'll have to re-check this when I'm more sane in the morning, but tentatively, this code solved my problem:
[CODE]
xpEngine engine = new XPression.xpEngine();
xpTools tools = new xpToolsLib.xpTools();
engine.GetOutputFrameBuffer(0, out this.frameBuffer);
private void button1_Click(object sender, EventArgs e)
{
xpScene scene;
xpImage frame;
engine.GetSceneByName("MyScene", out scene);
scene.GetRenderedFrame(scene.DefaultPreviewFrame, pictureBox1.Width, pictureBox1.Height, out frame);
IPicture picture = tools.ImageToPicture(frame);
pictureBox1.Image = Bitmap.FromHbitmap(new IntPtr(picture.Handle));
}
[/CODE]
I had tried tinkering with the xpTools first thing, but as there wasn't any real documentation, all I could glean was what JetBrains' dotPeek would tell me, which was not enough! Interestingly, dotPeek reported the xpToolsLib dll as having a method called
xpImageToBitmap which returns a Bitmap, but as evidenced from the code above, it does not return a Bitmap, but rather an IPicture.
I'm a little new to Visual Studio (and Windows development), so there may be something funny going on with the assemblies I've referenced in my project.
Thanks, Brian, for all your help.
#XPression