D3DXSaveTextureToFileInMemory function
Saves a texture to an image file.
Syntax
HRESULT D3DXSaveTextureToFileInMemory(
_Out_ LPD3DXBUFFER *ppDestBuf,
_In_ D3DXIMAGE_FILEFORMAT DestFormat,
_In_ LPDIRECT3DBASETEXTURE9 pSrcTexture,
_In_ const PALETTEENTRY *pSrcPalette
);
Parameters
-
ppDestBuf [out]
-
Type: LPD3DXBUFFER*
Address of a pointer to an ID3DXBuffer that will store the image.
-
DestFormat [in]
-
Type: D3DXIMAGE_FILEFORMAT
D3DXIMAGE_FILEFORMAT specifying the file format to use when saving. This function supports saving to all D3DXIMAGE_FILEFORMAT formats except Portable Pixmap (.ppm) and Targa/Truevision Graphics Adapter (.tga).
-
pSrcTexture [in]
-
Type: LPDIRECT3DBASETEXTURE9
Pointer to IDirect3DBaseTexture9 interface containing the image to be saved.
-
pSrcPalette [in]
-
Type: const PALETTEENTRY*
Pointer to a PALETTEENTRY structure containing a palette of 256 colors. This parameter can be NULL.
Return value
Type: HRESULT
If the function succeeds, the return value is D3D_OK. If the function fails, the return value can be the following: D3DERR_INVALIDCALL.
Remarks
This function handles conversion to and from compressed texture formats.
Requirements
Requirement | Value |
---|---|
Header |
|
Library |
|
See also