Click here to Skip to main content
15,920,031 members
Home / Discussions / Algorithms
   

Algorithms

 
GeneralRe: Tumbnail algorithm Pin
martin_hughes14-Sep-07 1:30
martin_hughes14-Sep-07 1:30 
GeneralRe: Tumbnail algorithm Pin
Giorgi Dalakishvili14-Sep-07 1:35
mentorGiorgi Dalakishvili14-Sep-07 1:35 
Questionconversion color - hexnumber - color Pin
Tom Deketelaere13-Sep-07 0:28
professionalTom Deketelaere13-Sep-07 0:28 
AnswerRe: conversion color - hexnumber - color Pin
Luc Pattyn13-Sep-07 1:36
sitebuilderLuc Pattyn13-Sep-07 1:36 
GeneralRe: conversion color - hexnumber - color Pin
Tom Deketelaere13-Sep-07 1:43
professionalTom Deketelaere13-Sep-07 1:43 
GeneralRe: conversion color - hexnumber - color Pin
Luc Pattyn13-Sep-07 2:00
sitebuilderLuc Pattyn13-Sep-07 2:00 
GeneralRe: conversion color - hexnumber - color Pin
Tom Deketelaere13-Sep-07 2:13
professionalTom Deketelaere13-Sep-07 2:13 
GeneralRe: conversion color - hexnumber - color Pin
Luc Pattyn13-Sep-07 2:36
sitebuilderLuc Pattyn13-Sep-07 2:36 
I am using C# syntax here:

So what you are saying is you have a hex integer c=0x00bbggrr where rr,gg,bb are the
255-complement of R,G,B and you need to figure out the values for R, G and B?

int r=c%255;
int b=(c>>8)%255;
int g=(c>>16)%255;
Color col=Color.FromArgb(255-r,255-g,255-b);


BTW there is no need for magic constants such as 16777215 (which is 0x00FFFFFF)

Smile | :)

Luc Pattyn [Forum Guidelines] [My Articles]


this weeks tips:
- make Visual display line numbers: Tools/Options/TextEditor/...
- show exceptions with ToString() to see all information
- before you ask a question here, search CodeProject, then Google


GeneralRe: conversion color - hexnumber - color Pin
Tom Deketelaere13-Sep-07 3:08
professionalTom Deketelaere13-Sep-07 3:08 
GeneralRe: conversion color - hexnumber - color Pin
Luc Pattyn13-Sep-07 3:18
sitebuilderLuc Pattyn13-Sep-07 3:18 
GeneralRe: conversion color - hexnumber - color Pin
Tom Deketelaere13-Sep-07 3:26
professionalTom Deketelaere13-Sep-07 3:26 
GeneralRe: conversion color - hexnumber - color Pin
Tim Craig13-Sep-07 18:21
Tim Craig13-Sep-07 18:21 
GeneralRe: conversion color - hexnumber - color Pin
Tom Deketelaere13-Sep-07 20:46
professionalTom Deketelaere13-Sep-07 20:46 
AnswerRe: conversion color - hexnumber - color Pin
Jeremy Falcon25-Sep-07 8:45
professionalJeremy Falcon25-Sep-07 8:45 
QuestionDinamyc priority asignation Pin
Nelek12-Sep-07 4:18
protectorNelek12-Sep-07 4:18 
AnswerRe: Dinamyc priority asignation Pin
Russell'13-Sep-07 6:54
Russell'13-Sep-07 6:54 
GeneralRe: Dinamyc priority asignation Pin
Nelek13-Sep-07 22:52
protectorNelek13-Sep-07 22:52 
GeneralRe: Dinamyc priority asignation Pin
Russell'14-Sep-07 0:02
Russell'14-Sep-07 0:02 
GeneralRe: Dinamyc priority asignation Pin
Nelek14-Sep-07 0:51
protectorNelek14-Sep-07 0:51 
GeneralRe: Dinamyc priority asignation Pin
Russell'14-Sep-07 1:07
Russell'14-Sep-07 1:07 
GeneralRe: Dinamyc priority asignation Pin
Nelek14-Sep-07 1:51
protectorNelek14-Sep-07 1:51 
GeneralRe: Dinamyc priority asignation Pin
Russell'14-Sep-07 2:17
Russell'14-Sep-07 2:17 
GeneralRe: Dinamyc priority asignation Pin
Nelek25-Sep-07 2:17
protectorNelek25-Sep-07 2:17 
GeneralRe: Dinamyc priority asignation Pin
Russell'25-Sep-07 3:03
Russell'25-Sep-07 3:03 
QuestionSemi automatic forground video segmentation Pin
ptr_Electron12-Sep-07 0:17
ptr_Electron12-Sep-07 0:17 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.