---
title: "GdiGraphics..::.GetPixel Method "
canonical: https://www.graphicsmill.com/docs/gm5/M_Aurigma_GraphicsMill_Drawing_GdiGraphics_GetPixel_2_22dcb54d.htm
product: "Graphics Mill 5.5 for .NET"
---

This documentation is for the old version. [Go to the latest Graphics Mill docs](https://www.graphicsmill.com/docs/gm/)

# GdiGraphics.GetPixel Method 
 
Gets a color of a pixel at specified coordinates.
 
**Namespace:** [Aurigma.GraphicsMill.Drawing](https://www.graphicsmill.com/docs/gm5/N_Aurigma_GraphicsMill_Drawing.htm.md)
 **Assembly:** Aurigma.GraphicsMill (in Aurigma.GraphicsMill.dll)
 
## Syntax
  
```
Public Function GetPixel ( _x As Integer, _y As Integer _
) As Color
```
 
```csharp
public Color GetPixel(int x,int y
)
```
 
### Parameters
 
 - x
     - Type: [System.Int32](http://msdn2.microsoft.com/en-us/td2s409d)
Horizontal coordinate of the required pixel.

 - y
     - Type: [System.Int32](http://msdn2.microsoft.com/en-us/td2s409d)
Vertical coordinate of the required pixel.
 
### Return Value
A color of the pixel at specified coordinates.
 
## Remarks
  
If the current [GdiGraphics](https://www.graphicsmill.com/docs/gm5/T_Aurigma_GraphicsMill_Drawing_GdiGraphics.htm.md) instance is opened for a device context, you should remember than not all devices have per-pixel access support. Also, the coordinates must be inside the clipping region.
 
**Note** 
This method works quite slow. It is ok to use it to get one color value, but if you need to process multiple pixels, it would be much faster to use direct access to memory.
   
## See Also

### Reference

- [GdiGraphics Class](https://www.graphicsmill.com/docs/gm5/T_Aurigma_GraphicsMill_Drawing_GdiGraphics.htm.md)
- [Aurigma.GraphicsMill.Drawing Namespace](https://www.graphicsmill.com/docs/gm5/N_Aurigma_GraphicsMill_Drawing.htm.md)
- [GdiGraphics.SetPixel(Int32, Int32, Color)](https://www.graphicsmill.com/docs/gm5/M_Aurigma_GraphicsMill_Drawing_GdiGraphics_SetPixel_3_5b67216d.htm.md)
