Romit
Romit

Reputation: 11

Finding width and height of a .bmp image in C

I wanted to know if it is possible to find the width and height of a .bmp image in C. I've looked all over the place but all I could find is examples in c#, .NET and C++. However, I couldn't find any code related to C. Please help if possible.

Upvotes: 1

Views: 3573

Answers (1)

mmrtnt
mmrtnt

Reputation: 392

http://en.wikipedia.org/wiki/BMP_file_format#Bitmap_File_Header

I'm assuming you'll have to write your own code to read the header and parse out the information you need.

I did something similar to this long ago, but I don't have a ready example.

Upvotes: 3

Related Questions