Skip to main content
GameDev.net gamedev.net
🔒 Locked

DirectX to Bitmap

Started by web_scripter Jan 10, 2007 at 8:49 PM 0 replies 2.1k views
Original Post
web_scripter
web_scripter
Hello, I am using DirectX to render images for html pages. So what I need to know is what would be the fastest way to get directX to render something and get the rendered image in the form of either a bitmap or an array of bytes. This is how i'm currently getting the image directX rendered: I'm rendering to a texture then saving it into a graphics stream then saving the stream into a bitmap.

GraphicsStream stream = TextureLoader.SaveToStream( ImageFileFormat.Png, renderTexture );
Bitmap bmp = new Bitmap( width, height, width, PixelFormat.Format32bppRgb, stream.InternalData );

Is there a faster way to do this? web_scripter

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.