Microsoft DirectX 9.0 SDK Update (October 2004)

TextureLoader.Save Method

Language:

Note: This documentation is preliminary and is subject to change.

Saves a texture to a file.

Definition

Visual Basic .NET Public Shared Sub Save( _
    ByVal destFile As String, _
    ByVal destFormat As ImageFileFormat, _
    ByVal srcTexture As BaseTexture _
)
C# public static void Save(
    string destFile,
    ImageFileFormat destFormat,
    BaseTexture srcTexture
);
Managed C++ public: static void Save(
    String *destFile,
    ImageFileFormat destFormat,
    BaseTexture *srcTexture
);
JScript .NET public static function Save(
    destFile : String,
    destFormat : ImageFileFormat,
    srcTexture : BaseTexture
);

Parameters

destFile System.String. String that specifies the file name of the source image.
destFormat Microsoft.DirectX.Direct3D.ImageFileFormat. An ImageFileFormat flag that specifies the file format to use when saving. See Remarks.
srcTexture Microsoft.DirectX.Direct3D.BaseTexture. A BaseTexture object that contains the texture to save.

Remarks

The Save method supports the .bmp and .dds file formats. It handles conversion to and from compressed texture formats.

If the volume is not dynamic (because a usage parameter was set to 0 at its creation) and is located in video memory (that is, the memory pool set to Default), this method fails because Microsoft® Direct3D® cannot lock non-dynamic volumes located in video memory.

Exceptions
InvalidCallException The method call is invalid. For example, a method's parameter might contain an invalid value.

See Also


© 2004 Microsoft Corporation. All rights reserved. Terms of use.

Feedback? Please provide us with your comments on this topic.
For more help, visit the DirectX Developer Center