Share via


TextureLoader.SaveToStream(ImageFileFormat,BaseTexture,PaletteEntry) Method (Microsoft.DirectX.Direct3D)

Saves a volume to a graphics stream.

Definition

Visual Basic Public Shared Function SaveToStream( _
    ByVal destFormat As ImageFileFormat, _
    ByVal srcTexture As BaseTexture, _
    ByRef sourcePalette As PaletteEntry _
) As GraphicsStream
C# public static GraphicsStream SaveToStream(
    ImageFileFormat destFormat,
    BaseTexture srcTexture,
    out PaletteEntry sourcePalette
);
C++ public:
static GraphicsStreamSaveToStream(
    ImageFileFormat destFormat,
    BaseTexturesrcTexture,
    [Out] PaletteEntrysourcePalette
);
JScript public static function SaveToStream(
    destFormat : ImageFileFormat,
    srcTexture : BaseTexture,
    sourcePalette : PaletteEntry
) : GraphicsStream;

Parameters

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.
sourcePalette Microsoft.DirectX.Direct3D.PaletteEntry[]
A PaletteEntry structure that contains a 256-color palette. This parameter can be 0.

Return Value

Microsoft.DirectX.GraphicsStream
A GraphicsStream object that contains the source image.

Remarks

Exceptions

InvalidCallException

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

See Also