Jump to content
  • Advertisement


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


Image sizes and resetting fstream

This topic is 5404 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

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

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!