See the note at the top of the
D3DX11SaveTextureToFile documentation:
Note Instead of using this function, we recommend that you use the
DirectXTex library,
CaptureTexture then SaveToXXXFile (where XXX is WIC, DDS, or TGA; WIC doesn't support DDS and TGA; D3DX 9 supported TGA as a common art source format for games). For the simplified scenario of creating a screen shot from a
render target texture, we recommend that you use the
DirectXTK library, SaveDDSTextureToFile or SaveWICTextureToFile.
Take a look at the DirectX Toolkit
for replacement helper functions for D3DX. Chuck's blog entry
Living without D3DX enumerates many equivalents.