Archived

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

Ekim_Gram

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

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
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