Skip to main content
GameDev.net gamedev.net
🔒 Locked

getting bitmap info

Started by phil67rpg Nov 13, 2011 at 10:54 PM 3 replies 700+ views
Original Post
phil67rpg
phil67rpg
[font="Consolas"][font="Consolas"]HRESULT result = D3DXGetImageInfoFromFile([/font][/font][font="Consolas"][color="#a31515"][font="Consolas"][color="#a31515"][font="Consolas"][color="#a31515"]"paddle.bmp"[/font][/font][/font][font="Consolas"][font="Consolas"],&info);
I am using this code. however it does not like the "paddle.bmp" command.

[/font][/font]
Tsus
Tsus
Hi!


HRESULT result = D3DXGetImageInfoFromFile("paddle.bmp",&info);
I am using this code. however it does not like the "paddle.bmp" command.

What do you mean?
Can’t you get it to compile? Then try putting an L before the string (that will make it a Unicode string), e.g.
HRESULT result = D3DXGetImageInfoFromFile(L"paddle.bmp",&info);
If you get a runtime error, you might try to specify the full path to the file, e.g.
HRESULT result = D3DXGetImageInfoFromFile("D:\\Test\\paddle.bmp",&info);
Any luck with that?
phil67rpg
phil67rpg
cool that worked, I am teaching myself how to render on the screen with sprites.It is slow going but I am learning.any advice for me.
phil67rpg
phil67rpg
well now I a getting a runtime error at ℑ line..

[font="Consolas"][font="Consolas"]result = d3ddev->CreateOffscreenPlainSurface(

800,

600,

D3DFMT_X8R8G8B8,

D3DPOOL_DEFAULT,

ℑ,

NULL);

[/font][/font]
Evil Steve
Evil Steve
Is d3ddev definitely not a null pointer? Is image on the stack (In the function), a member variable, a global, or something else?

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.