How can I output 3D screenshot to asp page

I would like to output the 3D screenshot to browser. I found the directX can output screenshot to file, such as:

SurfaceLoader.Save(dialog.FileName, ImageFileFormat.Jpg, _device.GetBackBuffer(0, 0, BackBufferType.Mono));

But I wish I could output directly to my ASP page. So I can render the screen shot in browser directly.

Thanks for help.

PS: A lot of existing examples in ASP is rendering bitmap, such as setting Response object's OutputStream by Bitmap:

Bitmap.Save (Response.OutputStream, ImageFormat.Jpeg)




Answer this question

How can I output 3D screenshot to asp page

  • Claudio Maras

    Thanks. You are right. But that is the first step for asp page to set the return type as MIME. Second step is to write the image stream out to page. This is what I wish to know. 

     



  • iHD

    You can take the screenshot and write to to the page, by setting the MIME type, and writing the bytes.

    www.asp.net is a good place to ask web based questions.



  • How can I output 3D screenshot to asp page