---
title: "UnitConverter..::.ConvertPixelsToUnits Method "
canonical: https://www.graphicsmill.com/docs/gm5/M_Aurigma_GraphicsMill_UnitConverter_ConvertPixelsToUnits_3_d5fc159a.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/)

# UnitConverter.ConvertPixelsToUnits Method 
 
Converts a value measured in pixels (device-dependent units) to specified device-independent unit.
 
**Namespace:** [Aurigma.GraphicsMill](https://www.graphicsmill.com/docs/gm5/N_Aurigma_GraphicsMill.htm.md)
 **Assembly:** Aurigma.GraphicsMill (in Aurigma.GraphicsMill.dll)
 
## Syntax
  
```
Public Shared Function ConvertPixelsToUnits ( _resolution As Single, _sourceValue As Integer, _destinationUnit As Unit _
) As Single
```
 
```csharp
public static float ConvertPixelsToUnits(float resolution,int sourceValue,Unit destinationUnit
)
```
 
### Parameters
 
 - resolution
     - Type: [System.Single](http://msdn2.microsoft.com/en-us/3www918f)
A resolution in DPI used to convert pixels to *destinationUnit*.

 - sourceValue
     - Type: [System.Int32](http://msdn2.microsoft.com/en-us/td2s409d)
A value in pixels which should be converted to *destinationUnit*.

 - destinationUnit
     - Type: [Aurigma.GraphicsMill.Unit](https://www.graphicsmill.com/docs/gm5/T_Aurigma_GraphicsMill_Unit.htm.md)
A destination unit.
 
### Return Value
A value converted to *destinationUnit*.
   
## See Also

### Reference

- [UnitConverter Class](https://www.graphicsmill.com/docs/gm5/T_Aurigma_GraphicsMill_UnitConverter.htm.md)
- [Aurigma.GraphicsMill Namespace](https://www.graphicsmill.com/docs/gm5/N_Aurigma_GraphicsMill.htm.md)
