c#獲取控件指定座標的像素值

[DllImport("gdi32.dll")]
        private static extern uint GetPixel(IntPtr hDC, int XPos, int YPos);
 Graphics g = control.CreateGraphics();
                    uint colorref = GetPixel(g.GetHdc(), center.X + convolution[i, j].X, center.Y + convolution[i, j].Y);  // picGraphics是我用picturePox類中的CreateGraphics方法創建的Graphics對象
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章