Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想知道是否有可能在 C 中找到 .bmp 图像的宽度和高度。我到处查看,但我只能找到 c#、.NET 和 C++ 中的示例。但是,我找不到任何与 C 相关的代码。如果可能,请提供帮助。
http://en.wikipedia.org/wiki/BMP_file_format#Bitmap_File_Header
我假设您必须编写自己的代码来读取标题并解析出您需要的信息。
我很久以前做过类似的事情,但我没有现成的例子。