Texture.FromFile Method

Creates a texture resource from a file.

NameDescription
Texture.FromFile (GraphicsDevice, Stream)Creates a texture resource from a stream.
Texture.FromFile (GraphicsDevice, Stream, Int32)Creates a texture resource from a stream, specifying the number of bytes in the stream.
Texture.FromFile (GraphicsDevice, Stream, Int32, TextureCreationParameters)Loads a Texture from a file.
Texture.FromFile (GraphicsDevice, Stream, TextureCreationParameters)Loads a Texture from a file.
Texture.FromFile (GraphicsDevice, String)Creates a texture resource from a file.
Texture.FromFile (GraphicsDevice, String, Int32, Int32, Int32)Creates a texture resource from a file, specifying the width, height, and depth of the texture in pixels.
Texture.FromFile (GraphicsDevice, String, TextureCreationParameters)Creates a texture resource from a file, specifying the parameters to be used in creation of the texture.

The supported texture image file formats are described by the ImageFileFormat enumeration.

Show: