SurfaceLoader.FromFile Method ()
Loads a surface from a file.
Overload List
Remarks
This method handles conversion to and from compressed texture formats and supports the following file formats: .bmp, .dds, .dib, .hdr, .jpg, .pfm, .png, .ppm, and .tga. For more information, see ImageFileFormat.
Writing to a surface level other than zero does not cause the dirty rectangle to be updated. If SurfaceLoader.FromFile is called and the surface is not already dirty (which is unlikely under normal usage scenarios), the application must explicitly call Texture.AddDirtyRect on the surface.
Exceptions
The method call is invalid. For example, a method's parameter might contain an invalid value.
The data is invalid.