• Advertisement

Archived

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

Finding an image's resolution? (c++)

This topic is 5084 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''m just curious. Is there any possible way to finding the resolution of a bitmap image? Why? I dunno...just for the hell of it. Maybe it would help with some bitmap handling functions...I honestly forgot the reason why but I was thinking about it a few hours ago while eating my dinner.
VG-Force | Ekim Gram Productions

Share this post


Link to post
Share on other sites
Advertisement
The header for the bitmap format is fairly well documented. Basically the second and third entry in the BITMAPINFOHEADER structure are the width and height respectively. If you were doing this in C++, you would open the file, read in a BITMAPFILEHEADER, do whatever validation you feel like on that (make sure it''s a bitmap etc.) then read in the BITMAPINFOHEADER.

Share this post


Link to post
Share on other sites

  • Advertisement