获取CBitmap RGB值 [英] Getting CBitmap RGB values

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

问题描述

我想知道对象的 RGB 值如何存储在以下位置:RGBRGBRGBRGBRGBRGBRGBRGBRGBRGBRGB或BGRBGRBGRBGRBGRBGRBGRBGRBGRBGR或RRRRRRRRRRGGGGGGGGGbGBBBBBBBBBBBB或某种方式.如何获得这些RGB值.

请帮助我:(

I am wondering how the RGB values of an CBitmap object are stored in: RGBRGBRGBRGBRGBRGBRGBRGBRGBRGB or BGRBGRBGRBGRBGRBGRBGRBGRBGRBGR or RRRRRRRRRRGGGGGGGGGGBBBBBBBBBB or some how. How to get these RGB values.

Help me please :(

推荐答案

如果您的实际意思是:如何在位图文件中存储RGB值?"的答案是
If you actually meant: "how are stored RGB values inside a bitmap file?" the answer is here[^].


一次执行一个像素.请注意,它始终是RGB,但取决于颜色图像的深度,可能会有一个Alpha位,所以它将是ARGB.您可以使用CBitmap.GetPixel()方法或GetDIBits() windows api方法.来获取/解码您下注的数据.
Do it a pixel at a time. Be aware that it''s always RGB, but depenbding on the color depth of the image, there could be an Alpha bit, so it would be ARGB. You can use the CBitmap.GetPixel() method, or GetDIBits() windows api method. When you google thaose methods, you should be able to eeasily find out how to get/decode the data you bet back.


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

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