Archived

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

Erzengeldeslichtes

Image sizes and resetting fstream

Recommended Posts

I have 2 questions that I can''t figure out: 1) DirectX has a D3DX library function to load numerous images (bmps, jpgs, etc). I can use these fine. What I need to know is: How do I find out the height and width of the bitmaps on the fly? The library functions take an already sized surface and put the newly loaded image onto it, so how do I find out the size at run time? Will I have to use CBitmap and then use loadsurfacefromfileinmemory or something? 2) when I use fstream I use .getline(), which moves the position in the file forward. How do I move it back? I tried seekg(0), seekg(1), seekg(0, ios::beg), and seekg(1, ios::beg)but it still says it''s past the eof.

Share this post


Link to post
Share on other sites