   D3DXLoadSurfaceFromFile - GIFs
  According to the documentation, D3DXLoadSurfaceFromFile doesn't support .gif files. However, I forgot this and loaded a gif file for a cursor image, and it displayed correctly anyway. I'm not sure how this would happen successfully unless there was gif loading code somewhere in the function. Did the DX team forget to mention that the D3DXLoadSurfaceFromFile supports gifs in the docs?   
  It could be an undocumented feature, there's plenty of them in any MS code.While it works, it simply adds risk to the project, since support may be removed or changed completely at some later point. It might also not be available in older versions.   ;  Ah, darned undocumented features. [smile]I think I'm going to continue to allow the use of GIFs, even if it's probably a bad idea. I'm using the last non-DX10 stuff version of the DX9 SDK and if I ever update and rewrite my code to use DX10 a ton of changes would have to be made anyway.Thanks!   ;  Direct3D 10 adds support for GIF and TIFF files, and so perhaps that is working because of that (assuming Direct3D 10 and Direct3D 9 have some code in common).   ;Quote:Original post by MastabaDirect3D 10 adds support for GIF and TIFF files, and so perhaps that is working because of that (assuming Direct3D 10 and Direct3D 9 have some code in common).I'm using the October 2005 SDK, the last one I could find before they added the D3D10 stuff. Maybe they simply added the fact that you could load GIFs in the docs. [smile]   ;  Note also that .NET's System.Drawing.Image.FromFile handles animated GIFs as well. It's very easy to build a tileset texture from the individual frames by using image.SelectActiveFrame().   ;  Interesting!If you've got a simple repro case you could fire it off to MS... Theres the 'Feedback? Please provide us with your comments on this topic.' link at the bottom of the page, and you could also CC directx@microsoft.com.I would imagine there are 2 cases:1. there was some prototype code at some point, but hasn't been removed (maybe it never worked properly)2. it's a documentation error - maybe it got added to the code, but they didn't update the doc pages...Jack   ;  There's another possibility - Is the file definitely a .gif? Are the first 3 bytes of the file "GIF"? It's possible that the file is actually a bitmap or something, with jus the extension changed to .gif...   ;  My guess is that GIF had been taken out, perhaps even at doc level only, because of the patent. The patent expired in 2003, but it's possible that the docs haven't been updated to reflect this.   ;Quote:Original post by ET3DMy guess is that GIF had been taken out, perhaps even at doc level only, because of the patent. The patent expired in 2003, but it's possible that the docs haven't been updated to reflect this.Yea, this sounds about right.  Even then, GIF is far from the most desirable texture format to be using.  I usually stick with .png, .tga, or .hdr to avoid any compression artifacts.  Yay for shipping on DVDs!   