问题
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