65,210
社区成员
发帖
与我相关
我的任务
分享
Graphics* myGraphics;
Image image(L"reseau1.bmp");
myGraphics = Graphics::FromImage(&image);
HDC hdc = myGraphics->GetHDC();
int weight = image.GetWidth();
int height = image.GetHeight();
for (int i=0; i <= weight; i++)
{
for (int j=0; j <= height; j++)
{
COLORREF col = ::GetPixel(hdc, i, j);
if (GetRValue(col) == 225 && GetGValue(col) == 0 && GetBValue(col) == 0)
{
sum[k] = i;
++k;
sum[k] = j;
++k;
}
}
}