R
rudolf
Hi,
I developed a small app that uses the following code snippet:
for (x=0;x<clipBitmap.Width;x+=2)
{
for (y=0;y<clipBitmap.Height;y+=2)
{
/* get hue of current pixel (0-360) */
index=Convert.ToInt16(clipBitmap.GetPixel(x,y).GetHue());
/* increment hue value */
Hue[index]++;
/* same with brightness */
index=Convert.ToInt16(clipBitmap.GetPixel(x,y).GetBrightness()*360.0);
Bri[index]++;
}
}
When the application reaches that code, the CPU goes up to 99% for the
time the code
needs to run. Is it possible to define a CPU limit or something else so
that the CPU does
not hit 99%?
Thanks in advance.
M.
I developed a small app that uses the following code snippet:
for (x=0;x<clipBitmap.Width;x+=2)
{
for (y=0;y<clipBitmap.Height;y+=2)
{
/* get hue of current pixel (0-360) */
index=Convert.ToInt16(clipBitmap.GetPixel(x,y).GetHue());
/* increment hue value */
Hue[index]++;
/* same with brightness */
index=Convert.ToInt16(clipBitmap.GetPixel(x,y).GetBrightness()*360.0);
Bri[index]++;
}
}
When the application reaches that code, the CPU goes up to 99% for the
time the code
needs to run. Is it possible to define a CPU limit or something else so
that the CPU does
not hit 99%?
Thanks in advance.
M.