Click here to Skip to main content
16,013,489 members
Home / Discussions / C#
   

C#

 
GeneralRe: VB to C# Pin
abandito28-Mar-05 1:13
abandito28-Mar-05 1:13 
GeneralRe: VB to C# Pin
DavidNohejl28-Mar-05 1:22
DavidNohejl28-Mar-05 1:22 
GeneralRe: VB to C# Pin
abandito28-Mar-05 1:36
abandito28-Mar-05 1:36 
Generalequivalaent of the delphi WITH statement Pin
sephless28-Mar-05 0:46
sephless28-Mar-05 0:46 
GeneralRe: equivalaent of the delphi WITH statement Pin
Wraith228-Mar-05 1:02
Wraith228-Mar-05 1:02 
GeneralRe: equivalaent of the delphi WITH statement Pin
DavidNohejl28-Mar-05 1:07
DavidNohejl28-Mar-05 1:07 
GeneralRe: equivalaent of the delphi WITH statement Pin
Dave Doknjas28-Mar-05 8:27
Dave Doknjas28-Mar-05 8:27 
Generalrequired selected color dropout logic Pin
montu337728-Mar-05 0:10
montu337728-Mar-05 0:10 
Hi ,

I want to filter the selected color from the image.I had already done the filtering the whole image with grascalling and making contrasting whole image but now i want to filter the image with selected color,Now i want to know logic for filtering the selected image.

here i am using the logic for contrasting the image (means filtering the whole image),now can anybody say how to deduct or filter the selected R,G,B value from the whole looping.Here i am describing whole loop which i am using for contrasting the image.

public void MakeContrastUnsafeFaster(int nContrast)
{
//Getting the how much pixel Arrays do you want to retrives.
Point size = PixelSize;

//Locking the bitmap for getting great performance
LockBitmap();
for (int y = 0; y < size.Y; y++)
{
PixelData* pPixel = PixelAt(0, y);
for (int x = 0; x < size.X; x++)
{
byte value = (byte) ((pPixel->red + pPixel->green + pPixel->blue) / 3);

// perform contrast enhancement here:
value = (value < 150 ) ? byte.MinValue : byte.MaxValue;
pPixel->red = value;
pPixel->green = value;
pPixel->blue = value;
pPixel++;
}
}
//Now Unlocking the Bitmap and making it free.
UnlockBitmap();
}

Here i am setting the R,G,B value with minimum and maximum value which bifercare my image into only black and white,

Now my requirement is that what to do in this logic by which only selected color dropped out?

anybody help into that?
GeneralMultiple files class Pin
danidanidani27-Mar-05 23:26
danidanidani27-Mar-05 23:26 
GeneralRe: Multiple files class Pin
matthias s.28-Mar-05 0:48
matthias s.28-Mar-05 0:48 
GeneralRe: Multiple files class Pin
danidanidani28-Mar-05 0:58
danidanidani28-Mar-05 0:58 
QuestionHow to change system time? Pin
pmasknguyen27-Mar-05 23:04
pmasknguyen27-Mar-05 23:04 
AnswerRe: How to change system time? Pin
JockerSoft28-Mar-05 0:37
JockerSoft28-Mar-05 0:37 
QuestionHow do we print one line at a time? Pin
WillStay27-Mar-05 22:43
WillStay27-Mar-05 22:43 
AnswerRe: How do we print one line at a time? Pin
Dave Kreskowiak28-Mar-05 5:25
mveDave Kreskowiak28-Mar-05 5:25 
GeneralRe: How do we print one line at a time? Pin
Anonymous28-Mar-05 6:21
Anonymous28-Mar-05 6:21 
GeneralRe: How do we print one line at a time? Pin
Dave Kreskowiak29-Mar-05 1:41
mveDave Kreskowiak29-Mar-05 1:41 
GeneralVALIDATING TEXT BOX DOES NOT WORK Pin
maheshfour27-Mar-05 22:42
maheshfour27-Mar-05 22:42 
GeneralRe: VALIDATING TEXT BOX DOES NOT WORK Pin
Darryl Borden28-Mar-05 10:12
Darryl Borden28-Mar-05 10:12 
GeneralRe: VALIDATING TEXT BOX DOES NOT WORK Pin
ameto31-Mar-05 23:09
ameto31-Mar-05 23:09 
GeneralRe: VALIDATING TEXT BOX DOES NOT WORK Pin
Darryl Borden1-Apr-05 2:38
Darryl Borden1-Apr-05 2:38 
GeneralSubst in c# .net (problem only in xp) Pin
orikoren27-Mar-05 22:35
orikoren27-Mar-05 22:35 
GeneralPC routing table management Pin
UrbanSpaceman27-Mar-05 22:19
UrbanSpaceman27-Mar-05 22:19 
GeneralRe: PC routing table management [EDITED] Pin
Dave Kreskowiak28-Mar-05 5:16
mveDave Kreskowiak28-Mar-05 5:16 
GeneralMultiple connections Pin
Micu Radu27-Mar-05 22:05
Micu Radu27-Mar-05 22:05 

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.