获得BMP文件的像素值 [英] Getting the pixel value of BMP file

查看:115
本文介绍了获得BMP文件的像素值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个问题要问读取bmp图像。我怎样才能在BMP图像的像素值(R,G,B值)?
用C语言编程谁能帮我?

i got a question for reading an bmp image. How can i get the pixel value(R, G, B values) in an bmp image? Can anyone help me using the C programming language?

推荐答案

最简单的办法是找到一个很好的图像处理库为您所选择的平台,并使用它。

The easy way would be to find a good image manipulation library for your chosen platform and use that.


  • 的Linux ImLib /的 GDK-PIXBUF(GNOME / GTK) / QT图像(KDE / QT)应该能够做你的需要。

  • 窗口我不熟悉相应的系统库,而是一个的 MSDN搜索位图可能是一个良好的开端。

  • 的Mac OSX 可可有一些图像处理功能,看<一个href=\"http://developer.apple.com/mac/library/DOCUMENTATION/Cocoa/Conceptual/CocoaDrawingGuide/Images/Images.html\">this文章。

  • Linux ImLib / GDK-Pixbuf (Gnome/GTK) / QT Image (KDE/Qt) should be able to do what you need.
  • Windows I'm not familiar with the appropriate system library, but an MSDN Search for "Bitmap" is probably a good place to start.
  • Mac OSX Cocoa has some image manipulation capabilities, see this article.

硬办法是打开的文件,实际上间preT中的二进制数据。要做到这一点,你需要的 BMP文件规范。我建议首先尝试的简单方法。

The hard way would be to open the file and actually interpret the binary data within. To do that you'll need the BMP File Specification. I'd recommend trying the easy way first.

这篇关于获得BMP文件的像素值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆