Click here to Skip to main content
16,017,238 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello,

I want to convert a ARGB color scheme to RGB in VC++.

Can anyone suggest a way with an example.

Kindly help me in this regard ASAP.

Many thanks in advance.
NSK
Posted

AFAIK, you can't convert ARGB to RGB without ignoring the Alpha channel: it provides supplementary information (namely the transparency) to the color defined by the RGB component.

That is like trying to convert a painting into a canvas without removing any paint...
 
Share this answer
 
Comments
Sergey Alexandrovich Kryukov 28-May-11 0:09am    
Sure, the question makes no sense. My 5.
--SA
You cannot do that. The alpha channel contains independent info used when combining the image with a background.
The only way to convert is removing such a info.
:-)
 
Share this answer
 
v2
Comments
Sergey Alexandrovich Kryukov 28-May-11 0:10am    
Sure, the question makes no sense. You explained it. My 5.
--SA
Ok, Thanks a lot for that information - If we ignore Alpha channel, then how we can apply the transparency on converting ARGB to RGB. How we can make use of Alpha?
I have ARGB value which I need to convert to RGB and paint it on a Grid.
Can anyone provide a VC sample which illustrates ARGB to RGB conversion ?

Many Thanks,
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900