Click here to Skip to main content
15,905,679 members
Home / Discussions / C#
   

C#

 
QuestionNULL problem Pin
Xmen Real 30-Aug-07 19:45
professional Xmen Real 30-Aug-07 19:45 
AnswerRe: NULL problem Pin
Martin#30-Aug-07 20:01
Martin#30-Aug-07 20:01 
GeneralRe: NULL problem Pin
Xmen Real 30-Aug-07 22:53
professional Xmen Real 30-Aug-07 22:53 
AnswerRe: NULL problem Pin
V.30-Aug-07 20:31
professionalV.30-Aug-07 20:31 
AnswerRe: NULL problem Pin
girm30-Aug-07 20:39
girm30-Aug-07 20:39 
AnswerRe: NULL problem Pin
Vasudevan Deepak Kumar30-Aug-07 22:18
Vasudevan Deepak Kumar30-Aug-07 22:18 
GeneralRe: NULL problem Pin
Martin#30-Aug-07 22:22
Martin#30-Aug-07 22:22 
AnswerRe: NULL problem Pin
Syed Mujtaba Hassan31-Aug-07 1:00
Syed Mujtaba Hassan31-Aug-07 1:00 
GeneralRe: NULL problem Pin
Xmen Real 31-Aug-07 2:19
professional Xmen Real 31-Aug-07 2:19 
QuestionDLL output file naming convension Pin
George_George30-Aug-07 19:44
George_George30-Aug-07 19:44 
AnswerRe: DLL output file naming convension Pin
\laddie30-Aug-07 20:55
\laddie30-Aug-07 20:55 
GeneralRe: DLL output file naming convension Pin
George_George30-Aug-07 21:23
George_George30-Aug-07 21:23 
GeneralRe: DLL output file naming convension Pin
\laddie30-Aug-07 21:34
\laddie30-Aug-07 21:34 
GeneralRe: DLL output file naming convension Pin
George_George30-Aug-07 21:49
George_George30-Aug-07 21:49 
Questionhow to use Contains method?? Pin
Situ1430-Aug-07 18:46
Situ1430-Aug-07 18:46 
AnswerRe: how to use Contains method?? [modified] Pin
Martin#30-Aug-07 19:26
Martin#30-Aug-07 19:26 
GeneralRe: how to use Contains method?? [modified] Pin
Situ1430-Aug-07 20:01
Situ1430-Aug-07 20:01 
AnswerRe: how to use Contains method?? Pin
Xmen Real 30-Aug-07 19:37
professional Xmen Real 30-Aug-07 19:37 
QuestionWiFi scanner Pin
Archyami30-Aug-07 17:24
Archyami30-Aug-07 17:24 
AnswerRe: WiFi scanner Pin
Judah Gabriel Himango30-Aug-07 17:51
sponsorJudah Gabriel Himango30-Aug-07 17:51 
GeneralRe: WiFi scanner Pin
Archyami30-Aug-07 18:21
Archyami30-Aug-07 18:21 
QuestionPixel operations on a very large image in c# Pin
safee ullah30-Aug-07 16:18
safee ullah30-Aug-07 16:18 
Hello folks,

I have a rather large image, whose size is around 6000 x 5000 pixels...

I would like to perfom image normalization and other such operations...which include some mathematical calculation for each pixel..

But when I do this on my image, it take about 20 mins to finish...

How to speed it up...??

Here is the normalization code which I am running..

public void NormalizeImage(ref Bitmap objBitmap, int iMaxColor)
{
DateTime dt = System.DateTime.Now;
System.Diagnostics.Trace.WriteLine(" Normalizing Image: " + dt);

int iX = objBitmap.Size.Width;
int iY = objBitmap.Size.Height;
int iMaxINTColor = 16777215;
try
{
for (int i = 0; i < iX; i++)
{
for (int j = 0; j < iY; j++)
{
int iPrevColorVal = objBitmap.GetPixel(i, j).ToArgb();
//if (iPrevColorVal < 0)
// iPrevColorVal = iPrevColorVal * -1;
int iNormalizedVal = System.Convert.ToInt32(Math.Pow((iPrevColorVal / iMaxColor), 1)) * iMaxINTColor;
objBitmap.SetPixel(i, j, Color.FromArgb(iNormalizedVal));
}
}
}
catch
{
System.Diagnostics.Debug.Assert(false);
}

DateTime dt2 = System.DateTime.Now;
System.Diagnostics.Trace.WriteLine("Done Normalizing Image:" + dt2);
}
AnswerRe: Pixel operations on a very large image in c# Pin
Judah Gabriel Himango30-Aug-07 17:27
sponsorJudah Gabriel Himango30-Aug-07 17:27 
AnswerRe: Pixel operations on a very large image in c# Pin
ekynox30-Aug-07 19:10
ekynox30-Aug-07 19:10 
AnswerRe: Pixel operations on a very large image in c# Pin
mav.northwind30-Aug-07 19:41
mav.northwind30-Aug-07 19:41 

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.