Hi everyone
I’m doing a project on reading the intensity of 256 grey-level bitmap. I’ve written a source code but the problem is that I am getting 1 error. It says that GetPixel function does not take 2 parameters. I’m not being able to correct it. Please help me.
Thank you.
Below is the source code:
/*in View.h*/
// Implementation
public:
unsigned int i[25][100];
int x,b;
int Get_Intensity(int);
COLORREF GetPixel (int, int);
/* in View.cpp */
#define MAX 100
void Get_Intensity(int i[25][100])
{
int x,y,FirstX,FirstY,LastX, LastY, Interval,count,Z;
x=0;
y=0;
FirstX = x+50;
FirstY = y+50;
LastX = FirstX + 394;
LastY = FirstY +100;
Interval = (LastX - FirstX)/25;
for (count = FirstX+Interval; count <= LastX;
(count=count+Interval)++)
{
for (int Z = FirstY; Z <= LastY; Z++)
{
i[count][Z] = GetPixel(count, Z);
}
}
}
int main()
{
int i[25][MAX];
for (int x=0; x<25; x++)
for (int b=0; b<MAX; b++)
i[x]=0;
return 0;
}
I’m doing a project on reading the intensity of 256 grey-level bitmap. I’ve written a source code but the problem is that I am getting 1 error. It says that GetPixel function does not take 2 parameters. I’m not being able to correct it. Please help me.
Thank you.
Below is the source code:
/*in View.h*/
// Implementation
public:
unsigned int i[25][100];
int x,b;
int Get_Intensity(int);
COLORREF GetPixel (int, int);
/* in View.cpp */
#define MAX 100
void Get_Intensity(int i[25][100])
{
int x,y,FirstX,FirstY,LastX, LastY, Interval,count,Z;
x=0;
y=0;
FirstX = x+50;
FirstY = y+50;
LastX = FirstX + 394;
LastY = FirstY +100;
Interval = (LastX - FirstX)/25;
for (count = FirstX+Interval; count <= LastX;
(count=count+Interval)++)
{
for (int Z = FirstY; Z <= LastY; Z++)
{
i[count][Z] = GetPixel(count, Z);
}
}
}
int main()
{
int i[25][MAX];
for (int x=0; x<25; x++)
for (int b=0; b<MAX; b++)
i[x]=0;
return 0;
}