WOW's BLP loading problem

I am trying to load blp file of world of warcraft.
I do it in the following steps:

1:read in the header from blp file
2:read in the data from blp file according to the header
3:create texture according to the blp_header info
4:lock the texture--copy data into it--unlock.

It works but
I wonder if I am doing the effecient way?

I wonder if D3DXCreateTextureFromFile work the same way:
load data-->create texture-->copy data.

thx in advanced.

[479 byte] By [ccanan] at [2007-12-25]
# 1

If the raw texture data are saved in the same format that the texture requires you may be able to load it directly to the locked texture. This will save you the copy.

But you need to be careful about the stride. If you can’t load it as one large block multiple calls to the load function could be slower.

RalfKornmann at 2007-10-8 > top of Msdn Tech,Game Technologies: DirectX, XNA, XACT, etc.,Game Technologies: Graphics...