Click here to Skip to main content
15,886,919 members
Home / Discussions / C#
   

C#

 
GeneralRe: invoking the compiler from my own code Pin
LongRange.Shooter26-Nov-02 4:56
LongRange.Shooter26-Nov-02 4:56 
GeneralRe: invoking the compiler from my own code Pin
leppie26-Nov-02 6:11
leppie26-Nov-02 6:11 
GeneralRe: invoking the compiler from my own code Pin
LongRange.Shooter26-Nov-02 8:49
LongRange.Shooter26-Nov-02 8:49 
GeneralRe: invoking the compiler from my own code Pin
leppie26-Nov-02 9:29
leppie26-Nov-02 9:29 
GeneralRe: invoking the compiler from my own code Pin
LongRange.Shooter26-Nov-02 10:07
LongRange.Shooter26-Nov-02 10:07 
GeneralRe: invoking the compiler from my own code Pin
leppie26-Nov-02 12:39
leppie26-Nov-02 12:39 
GeneralRe: invoking the compiler from my own code Pin
LongRange.Shooter26-Nov-02 10:18
LongRange.Shooter26-Nov-02 10:18 
GeneralReplace colour using GDI+ Pin
BigAndy22-Nov-02 4:56
BigAndy22-Nov-02 4:56 
Hi all,

Here's a quick question that has been bugging me for a while.

All I want to do is implement a ReplaceColor function for a given bitmap. I have written a simple version in GDI+ using ImageAttributes, ColorMap and Graphics.DrawImage, which works ok. It replaces a given rgb value with a new rgb value.

What I really want to do is include a threshold value. For example, if I had a bitmap of a red square gradient from red (255, 0, 0) to white (255, 255, 255). If the theshold value was high enough and the find colour was red (255, 0, 0) and the replace color was blue (0, 0, 255). The result would be a blue square gradient from blue (0, 0, 255) to white (255, 255, 255).

Any ideas? Is there a built in GDI+ method for doing this or would I need to write my own? I've seen the SetThreshold method of ImageAttributes, can I use this?

Thanks in advance
Andy
GeneralRe: Replace colour using GDI+ Pin
Joshua Nussbaum22-Nov-02 10:45
Joshua Nussbaum22-Nov-02 10:45 
QuestionSyntax Highlightning with C# and RichTextBox? Pin
Joe_22-Nov-02 1:19
Joe_22-Nov-02 1:19 
AnswerRe: Syntax Highlightning with C# and RichTextBox? Pin
perlmunger25-Nov-02 19:24
perlmunger25-Nov-02 19:24 
GeneralImpersonate remote caller Pin
solidstore21-Nov-02 23:14
solidstore21-Nov-02 23:14 
GeneralFinding the baseline of a Font Pin
Oppy21-Nov-02 12:56
Oppy21-Nov-02 12:56 
GeneralEncasing other windows in a C# winform Pin
Anonymous21-Nov-02 11:11
Anonymous21-Nov-02 11:11 
GeneralProblem with AutoScrollPosition Pin
Marc Clifton21-Nov-02 10:37
mvaMarc Clifton21-Nov-02 10:37 
GeneralRe: Problem with AutoScrollPosition Pin
leppie22-Nov-02 6:35
leppie22-Nov-02 6:35 
Generalhelp with executing a transform! Pin
LongRange.Shooter21-Nov-02 9:36
LongRange.Shooter21-Nov-02 9:36 
GeneralRe: help with executing a transform! Pin
LongRange.Shooter22-Nov-02 9:35
LongRange.Shooter22-Nov-02 9:35 
QuestionCopying pointer to pointer? Pin
Zombies with Coffee, LLC21-Nov-02 9:02
professionalZombies with Coffee, LLC21-Nov-02 9:02 
AnswerRe: Copying pointer to pointer? Pin
leppie21-Nov-02 9:33
leppie21-Nov-02 9:33 
GeneralRe: Copying pointer to pointer? Pin
Zombies with Coffee, LLC21-Nov-02 9:45
professionalZombies with Coffee, LLC21-Nov-02 9:45 
AnswerRe: Copying pointer to pointer? Pin
John Fisher21-Nov-02 9:54
John Fisher21-Nov-02 9:54 
GeneralRe: Copying pointer to pointer? Pin
Zombies with Coffee, LLC21-Nov-02 9:57
professionalZombies with Coffee, LLC21-Nov-02 9:57 
GeneralRe: Copying pointer to pointer? Pin
leppie21-Nov-02 10:05
leppie21-Nov-02 10:05 
GeneralRe: Copying pointer to pointer? Pin
Zombies with Coffee, LLC21-Nov-02 10:18
professionalZombies with Coffee, LLC21-Nov-02 10:18 

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.