Click here to Skip to main content
15,894,405 members
Home / Discussions / C#
   

C#

 
GeneralCustom Forms Designer Pin
Gevik Babakhani22-Nov-02 11:45
Gevik Babakhani22-Nov-02 11:45 
GeneralRe: Custom Forms Designer Pin
John Fisher25-Nov-02 10:29
John Fisher25-Nov-02 10:29 
GeneralConfig files embedded in exe Pin
BarryJ22-Nov-02 11:15
BarryJ22-Nov-02 11:15 
GeneralRe: Config files embedded in exe Pin
Gevik Babakhani22-Nov-02 11:57
Gevik Babakhani22-Nov-02 11:57 
Generalinvoking the compiler from my own code Pin
LongRange.Shooter22-Nov-02 9:33
LongRange.Shooter22-Nov-02 9:33 
GeneralRe: invoking the compiler from my own code Pin
leppie22-Nov-02 12:20
leppie22-Nov-02 12:20 
GeneralRe: invoking the compiler from my own code Pin
LongRange.Shooter25-Nov-02 3:37
LongRange.Shooter25-Nov-02 3:37 
GeneralRe: invoking the compiler from my own code Pin
leppie23-Nov-02 2:31
leppie23-Nov-02 2:31 
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 

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.