我有个delphi语句是这样的htonl(GetPixel(Bitmap.Canvas.Handle, x, y))
C# 怎么实现呀
Bitmap bt = new Bitmap(FileUpload1.PostedFile.InputStream);
for (int i = 0; i < bt.Width ; i++)
{
for (int j = 0; j < bt .Height ; j++)
{
Color c = bt.GetPixel(i, j);
Pixels[i * bt.Height + j] = htonl(c );
}
}
}
[DllImport("wsock32.dll ")]
public static extern uint htonl(Color ss);
我这样写不对,怎么办
C# 怎么实现呀
Bitmap bt = new Bitmap(FileUpload1.PostedFile.InputStream);
for (int i = 0; i < bt.Width ; i++)
{
for (int j = 0; j < bt .Height ; j++)
{
Color c = bt.GetPixel(i, j);
Pixels[i * bt.Height + j] = htonl(c );
}
}
}
[DllImport("wsock32.dll ")]
public static extern uint htonl(Color ss);
我这样写不对,怎么办
你现Color c = bt.GetPixel(i, j);
htonl(c );这是颜色,参数不对