display red channel of image using GDI

我只是一个虾纸丫 提交于 2019-12-08 08:23:43

问题


I have 24 bit RGB image.I want to display only the red channel onto the display using GDI. Should i use palette for that? What is the strategy to be used?

Please guide me appropriately.


回答1:


The quickest way is to use BitBlt. Create another 24 bit bitmap of the same size as your RGB image. Fill it with pure red. Then use BitBlt with SRCAND. As described in the documentation this

Combines the colors of the source and destination rectangles by using the Boolean AND operator.



来源:https://stackoverflow.com/questions/23052165/display-red-channel-of-image-using-gdi

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!