Sdílet prostřednictvím


Texture2D.FromFile Method

Creates a texture resource from a file.

Overload List

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

Remarks

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

See Also

Reference

Texture2D Class
Texture2D Members
Microsoft.Xna.Framework.Graphics Namespace