Original Post
I am having a problem creating a 3D Texture from a Memory Stream. Here is what I am doing. //* xTmpImage is initilized and loads a bmp file elsewhere System.Drawing.Bitmap xTmpImage xImageStream = new System.IO.MemoryStream(); xTmpImage.Save( xImageStream, ImageFormat.Bmp ); xTmpTexture = TextureLoader.FromStream( GrafixEnv.Device, xImageStream, xImageStream.Length); When the FromStream function executes I get the following errors ManagedDX: The HRESULT 0x88760b59 was returned (D3DXERR_INVALIDDATA). Please turn on unmanaged debugging for more information. An unhandled exception of type 'Microsoft.DirectX.Direct3D.InvalidDataException' occurred in microsoft.directx.direct3dx.dll Additional information: Error in the application. I have double checked all of the parameters and they are all initilied and valid. When I try to create the texture from a file it works ok. The only thing that I can think of is the BMP file written to the memory stream is somehow missing some data. Thanx in advance for the help.