SurfaceLoader.FromFile Method |
Language: |
Loads a surface from a file.
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
InvalidCallException The method call is invalid. For example, a method's parameter might contain an invalid value. InvalidDataException The data is invalid.
Send comments about this topic to Microsoft. © Microsoft Corporation. All rights reserved.
Feedback? Please provide us with your comments on this topic.
For more help, visit the DirectX Developer Center