Hello..
I have a problem..i want to store a color variable to an array..
Let see my code
Bitmap* bmp = bmp->FromFile(L"coba.bmp", false);
Color color;
and
int i,j;
int width;
int height;
int matriks_gbr[10][10];
width = bmp->GetWidth();
height = bmp->GetHeight();
for (i=0;i<=height-1;i++)
{
for (j=0;j<=width-1;j++)
{
matriks_gbr[i][j] = bmp->GetPixel(i,j,&color);
}
}
and just wanna to check the content of matriks_gbr :
if (matriks_gbr[0][0] = RGB(255,255,255))
AfxMessageBox(_T("works"), MB_OK);
else
AfxMessageBox(_T("not works"), MB_OK);
It worked out (message works) , but when i changed to RGB(255,255,255) to nonzeero number like 255 or 20 , it also appeared "works".
Later i know the problem, getpixel only return Ok and non-ok.
But i want to access the color and store it to an array..
Can you tell me how to store it to array?