D3DXSaveSurfaceToFile(fichero, D3DXIFF_BMP, surface, NULL, &rect);
D3DXSaveSurfaceToFile(fichero, D3DXIFF_JPG, surface, NULL, &rect);
Cita de: "[EX3"] DX9 permite grabar a otro formato que no sea BMP? En dx8 solo deja en BMP :ph34r:Hi,
Salu2...
typedef enum D3DXIMAGE_FILEFORMAT
{
D3DXIFF_BMP = 0,
D3DXIFF_JPG = 1,
D3DXIFF_TGA = 2,
D3DXIFF_PNG = 3,
D3DXIFF_DDS = 4,
D3DXIFF_PPM = 5,
D3DXIFF_DIB = 6,
D3DXIFF_HDR = 7,
D3DXIFF_PFM = 8,
D3DXIFF_FORCE_DWORD = 0x7fffffff,
} D3DXIMAGE_FILEFORMAT, *LPD3DXIMAGE_FILEFORMAT;
Cita de: "AgeR"Al menos a partir de DX9 se podía guardar en jpg, no sé si antes también.No, me temo que en DX8 solo permite BMP y DDS:
QUOTE (Referencia DirectX8 para C++ (en la doc de VB se olvidaron de comentar esta funcion ¬¬U)) |
D3DXSaveSurfaceToFile Saves a surface to a file. Código [Seleccionar] HRESULT D3DXSaveSurfaceToFile( Parameters pDestFile [in] File name to save the surface to. DestFormat [in] D3DXIMAGE_FILEFORMAT specifying file format to use when saving. pSrcSurface [in] Pointer to IDirect3DSurface8 interface, containing the image to be saved. pSrcPalette [in] Pointer to a PALETTEENTRY structure containing a palette of 256 colors. This parameter can be NULL. pSrcRect [in] Pointer to a RECT structure. Specifies the source rectangle. Set this parameter to NULL to specify the entire image. Return Values 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 supports the following file formats: .bmp and .dds. This function handles conversion to and from compressed texture formats. This function supports both Unicode and ANSI strings. Requirements Header: Declared in D3dx8tex.h. Import Library: Use D3dx8.lib. See Also D3DXSaveTextureToFile, D3DXSaveVolumeToFile[/quote] Weno, si tuviese una necesidad de hacerlo en un formato que no sea el BMP tengo por suerte una libreria externa para realizar exportaciones a otros formatos, el que no se apaña es por que no quiere :P Salu2... |