Click here to Skip to main content
15,884,629 members
Home / Discussions / C#
   

C#

 
GeneralRe: Multiple Document Intrface problem-Ineed help Pin
sreejith ss nair3-Sep-04 2:52
sreejith ss nair3-Sep-04 2:52 
GeneralExocortex.DSP question Pin
Shiro19813-Sep-04 1:56
Shiro19813-Sep-04 1:56 
QuestionIt allways prints to my default printer but i want to choose the printer in code? Pin
robmays3-Sep-04 1:55
robmays3-Sep-04 1:55 
GeneralCreating a XSLT File Pin
teo_x3-Sep-04 1:53
teo_x3-Sep-04 1:53 
GeneralRe: Creating a XSLT File Pin
sreejith ss nair3-Sep-04 2:55
sreejith ss nair3-Sep-04 2:55 
QuestionHow to invert pixel color of a bitmap ? Pin
sachinkalse3-Sep-04 0:24
sachinkalse3-Sep-04 0:24 
AnswerRe: How to invert pixel color of a bitmap ? Pin
sreejith ss nair3-Sep-04 2:44
sreejith ss nair3-Sep-04 2:44 
GeneralRe: How to invert pixel color of a bitmap ? Pin
sachinkalse5-Sep-04 22:17
sachinkalse5-Sep-04 22:17 
Solved it !!!
pasting the same for the community
-----------------------------------------------------

Bitmap _bitmap = new Bitmap(_originalmage, _originalmage.Size);

BitmapData data = _bitmap.LockBits(
new Rectangle(0, 0, _bitmap.Width, _bitmap.Height), ImageLockMode.ReadWrite,
PixelFormat.Format24bppRgb);
if (data != null)
{
unsafe
{
//
// Refering all eliments
//
byte * p = (byte *)data.Scan0.ToPointer();

for (int y = 0; y < data.Height; y++)
{
for (int c = 0; c < data.Stride; c += 3)
{
// GET RGB
byte b = p[c];
byte g = p[c+1];
byte r = p[c+2];

// ToDo :: Reverse
if (b == 0 && g == 0 && r == 0)
{
// SetPixcel to WHITE
p[c] = 255;
p[c+1] = 255;
p[c+2] = 255;
}
else if (b == 255 && g == 255 && r == 255)
{
// SetPixcel to BLACK
p[c] = 0;
p[c+1] = 0;
p[c+2] = 0;
}
}
p += data.Stride;
}
}
}

_bitmap.UnlockBits(data);

-------------------------------------------------

regardsBig Grin | :-D
GeneralPluggin' in the Plug-In - HMOG Pin
Sebastian Schneider3-Sep-04 0:20
Sebastian Schneider3-Sep-04 0:20 
GeneralCant change the Expandable property from property grid Pin
pradeep_pc3-Sep-04 0:15
pradeep_pc3-Sep-04 0:15 
GeneralRe: Cant change the Expandable property from property grid Pin
sreejith ss nair3-Sep-04 2:40
sreejith ss nair3-Sep-04 2:40 
GeneralDisable write in comboBox C# Pin
adnanh752-Sep-04 22:35
adnanh752-Sep-04 22:35 
GeneralRe: Disable write in comboBox C# Pin
Syed Abdul Khader2-Sep-04 23:48
Syed Abdul Khader2-Sep-04 23:48 
GeneralRe: Disable write in comboBox C# Pin
shaunAustin2-Sep-04 23:48
shaunAustin2-Sep-04 23:48 
GeneralThanks Pin
adnanh752-Sep-04 23:50
adnanh752-Sep-04 23:50 
GeneralC# Accessors Pin
carradus2-Sep-04 21:57
carradus2-Sep-04 21:57 
GeneralRe: C# Accessors Pin
leppie3-Sep-04 1:10
leppie3-Sep-04 1:10 
GeneralRe: C# Accessors Pin
carradus6-Sep-04 23:33
carradus6-Sep-04 23:33 
GeneralRe: C# Accessors Pin
leppie7-Sep-04 1:59
leppie7-Sep-04 1:59 
QuestionHow to get information of User? Pin
I am kai2-Sep-04 21:47
I am kai2-Sep-04 21:47 
AnswerRe: How to get information of User? Pin
Sebastian Schneider2-Sep-04 22:44
Sebastian Schneider2-Sep-04 22:44 
AnswerRe: How to get information of User? Pin
shaunAustin2-Sep-04 23:58
shaunAustin2-Sep-04 23:58 
Questionhow to use datatable Pin
PrasadVarma2-Sep-04 20:04
PrasadVarma2-Sep-04 20:04 
AnswerRe: how to use datatable Pin
sreejith ss nair2-Sep-04 20:50
sreejith ss nair2-Sep-04 20:50 
GeneralRe: how to use delegates? Pin
mav.northwind2-Sep-04 20:35
mav.northwind2-Sep-04 20:35 

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.