Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

16 Bit Bitmap

Posted on 2000-04-12
4
Medium Priority
?
269 Views
Last Modified: 2013-11-20
How do I mask a 16 bit bitmap color (0RRRRRGGGGGBBBBB) into a RGB value ?

Thanks,
Tony.
0
Comment
Question by:Tony_Sebastian
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 8

Expert Comment

by:VinExpert
ID: 2710456
Hi,
pls be little more specific to ur prob. There may be another way to achive that!!.

VinExpert
0
 
LVL 10

Accepted Solution

by:
RONSLOW earned 400 total points
ID: 2710725
int b = (c % 32)*255/31; c /= 32;
int g = (c % 32)*255/31; c /= 32;
int r = (c % 32)*255/31;
COLORREF rgb = RGB(r,g,b);


0
 

Author Comment

by:Tony_Sebastian
ID: 2712208
That's it !!! it works!!! for any body else out there c = WORD

int b = (c % 32)*255/31; c /= 32;
int g = (c % 32)*255/31; c /= 32;
int r = (c % 32)*255/31;
COLORREF rgb = RGB(r,g,b);

Great stuff, I don't know why they don't make this available in the SDK.

Thanks again.




0
 
LVL 10

Expert Comment

by:RONSLOW
ID: 2712353
welcome
0

Featured Post

Ask an Anonymous Question!

Don't feel intimidated by what you don't know. Ask your question anonymously. It's easy! Learn more and upgrade.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this article, I'll describe -- and show pictures of -- some of the significant additions that have been made available to programmers in the MFC Feature Pack for Visual C++ 2008.  These same feature are in the MFC libraries that come with Visual …
Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…

604 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question