---
title: "BitmapData..::.GetPixel Method "
canonical: https://www.graphicsmill.com/docs/gm5/M_Aurigma_GraphicsMill_BitmapData_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/)

# BitmapData.GetPixel Method 
 
Returns pixel value at specified coordinates.
 
**Namespace:** [Aurigma.GraphicsMill](https://www.graphicsmill.com/docs/gm5/N_Aurigma_GraphicsMill.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 position of the pixel.

 - y
     - Type: [System.Int32](http://msdn2.microsoft.com/en-us/td2s409d)
Vertical position of the pixel.
 
### Return Value
Pixel value at the specified position. The actual type of the returned object depends on color space of the bitmap. E.g. if bitmap is in RGB color space, actual type will be [RgbColor](https://www.graphicsmill.com/docs/gm5/T_Aurigma_GraphicsMill_RgbColor.htm.md), etc.
 
## Remarks
  
This method was implemented for easy but slow access to pixels. It works ideally if you need to get one pixel value, for example, when you implement color picker. However if you need iterate each pixel in bitmap, it will work too slow. In this case you should consider using [Scan0](https://www.graphicsmill.com/docs/gm5/P_Aurigma_GraphicsMill_BitmapData_Scan0.htm.md) property instead. This property provides you a direct access to pixels.
   
## See Also

### Reference

- [BitmapData Class](https://www.graphicsmill.com/docs/gm5/T_Aurigma_GraphicsMill_BitmapData.htm.md)
- [Aurigma.GraphicsMill Namespace](https://www.graphicsmill.com/docs/gm5/N_Aurigma_GraphicsMill.htm.md)
