Sdílet prostřednictvím


Texture.Save Method

Note

This method is available only when developing for Windows.

Saves a texture to a file.

Namespace: Microsoft.Xna.Framework.Graphics
Assembly: Microsoft.Xna.Framework (in microsoft.xna.framework.dll)

Syntax

public void Save (
         string filename,
         ImageFileFormat format
)

Parameters

  • filename
    The file name of the destination image.
  • format
    The file format to use when saving. This function supports saving to all ImageFileFormat formats except Portable Pixmap (.ppm) and Targa/Truevision Graphics Adapter (.tga).

Remarks

This function handles conversion to and from compressed texture formats.

If the volume is nondynamic and located in video memory, Save will fail because this function cannot lock nondynamic volumes located in video memory.

See Also

Reference

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

Platforms

Windows XP SP2, Windows Vista