This topic is now archived and is closed to further replies.


This topic is 6019 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

In the SDK documentation, the function description for D3DXCreateTextureFromFile() is as follows:
Creates a texture from a file specified by an ANSI string.
Until now, I assumed that this only worked with .bmp files (since this is the format used in the directX tutorials, and samples I looked at). However, I saw on another website, that this can also be used with jpeg files. Does the DirectX documentation suck, or am I not looking in the right place? I would like to know a full list of the supported imagetypes. Please let me know what these are, or where I can find out.

Share this post

Link to post
Share on other sites
Well, I suppose you could always try it if you are in doubt. It can probably handle just about any image type, except for the really rare ones.

Share this post

Link to post
Share on other sites

The CreateTextureFromFile supports a lot more :
- BMP (normal and compressed format)
- DDS (any format, even compressed DXT1, DXT3, DXT5, etc...)
- JPG, GIF, PNG : Good for the compression...

It converts internally to the texture to the best DX format.

If you want to choose yourself the format, pool, size of the loaded texture, use rather the D3DXCreateTextureFromFileEx...

Well hope this helps
TrueVision3D Programmer

Share this post

Link to post
Share on other sites