Finding an image's resolution? (c++)
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
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.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement