SurfaceLoader.SaveToStream(ImageFileFormat,Surface) Method (Microsoft.DirectX.Direct3D)
Saves a surface to a stream.
Definition
Visual Basic Public Shared Function SaveToStream( _
ByVal destFormat As ImageFileFormat, _
ByVal srcSurface As Surface _
) As GraphicsStreamC# public static GraphicsStream SaveToStream(
ImageFileFormat destFormat,
Surface srcSurface
);C++ public:
static GraphicsStream^ SaveToStream(
ImageFileFormat destFormat,
Surface^ srcSurface
);JScript public static function SaveToStream(
destFormat : ImageFileFormat,
srcSurface : Surface
) : GraphicsStream;
Parameters
destFormat Microsoft.DirectX.Direct3D.ImageFileFormat
An ImageFileFormat object that specifies the file format to use when saving the surface to a stream. This method supports saving to all ImageFileFormat types except Portable Pixmap (.ppm) and Targa/Truevision Graphics Adapter (.tga).srcSurface Microsoft.DirectX.Direct3D.Surface
A Surface object that represents the source surface to save to a file.
Return Value
Microsoft.DirectX.GraphicsStream
A GraphicsStream object that contains the saved surface data.
Remarks
This method handles conversion to and from compressed texture formats.
Exceptions
The method call is invalid. For example, a method's parameter might contain an invalid value.