   Image Loading without D3DX
  Since the only thing my program uses from D3DX is the texture load function, it seems like a waste and is kind of annoying to distribute the D3DX with my application.My question is, is there any image loading library that can easily load PNG files and then put them into textures? I have looked into writing my own PNG loader (got as far as starting to parse loaded chunks) and looking at pnglib (which frankly looks more complicated than writing your own) but haven't found an easy alternative. Is there one?   
  SDL_image, DevIL, FreeImage...the usual suspects that the GL crowd tend to use.   ;  If you're looking to minimise dependencies, AFAIK GDI+ ships with Windows XP and can load PNG files.  Then you can lock the loaded image, lock a texture, and copy the data across.  That's probably something like what the D3DX function does anyway.   ;  libpng isn't that hard to use.  It has lots of features that you can ignore since you probably don't need them.  Definately do not write your own PNG parser.  You can link against it staticly so that you don't need to distribute another file besides your EXE.libpng is what D3DX uses.   ;Quote:Original post by brwarnerit seems like a waste and is kind of annoying to distribute the D3DX with my application.My understanding is that you are not supposed to distribute the D3DX dll as an individual file. I believe that Microsoft rules are that you may only distribute the runtime installer, which will put the latest version of the D3DX dll on the user's system along with all the other DirectX runtime components.For DirectX 9.0c, the redistributable is here.   ;Quote:Original post by brwarnerSince the only thing my program uses from D3DX is the texture load function, it seems like a waste and is kind of annoying to distribute the D3DX with my application.Are you not using any of the matrix functions at all? They're one of the most used components of D3DX I know of.And as Aardvajk said - it's no extra work to support D3DX. You need to be bundling the D3D installer with your app to install things properly (Or link the user to it, or include the web installer). It's against the EULA to distribute D3D or D3DX DLL files with your application, and it has security concerns (Which is why it's against the EULA in the first place). If a security problem is found in D3D/D3DX, it can be patched with Windows Update - but not if your application has its own copy of the DLLs.   