---
title: "PixelFormatConverter..::.ConvertArray Method (array&lt;Int32,3&gt;[,](,)[,], PixelFormat, ColorProfile)"
canonical: https://www.graphicsmill.com/docs/gm5/M_Aurigma_GraphicsMill_Transforms_PixelFormatConverter_ConvertArray_5_8e1aa601.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/)

# PixelFormatConverter.ConvertArray Method (Int32[,], PixelFormat, ColorProfile)
 
Converts several colors into another pixel format. These colors are represented by array. Color management is applied.
 
**Namespace:** [Aurigma.GraphicsMill.Transforms](https://www.graphicsmill.com/docs/gm5/N_Aurigma_GraphicsMill_Transforms.htm.md)
 **Assembly:** Aurigma.GraphicsMill (in Aurigma.GraphicsMill.dll)
 
## Syntax
  
```
Public Function ConvertArray ( _array As Integer(,,), _format As PixelFormat, _profile As ColorProfile _
) As Integer(,,)
```
 
```csharp
public int[,,] ConvertArray(int[,,] array,PixelFormat format,ColorProfile profile
)
```
 
### Parameters
 
 - array
     - Type:  [System.Int32](http://msdn2.microsoft.com/en-us/td2s409d) [,]
 
Array of image pixels should have the following format: first dimension is bitmap columns, second dimension is a bitmap rows, third dimension is a pixels channels. Array with this format is returned from [Export()](https://www.graphicsmill.com/docs/gm5/M_Aurigma_GraphicsMill_Bitmap_Export.htm.md) method of [Bitmap](https://www.graphicsmill.com/docs/gm5/T_Aurigma_GraphicsMill_Bitmap.htm.md) and [BitmapData](https://www.graphicsmill.com/docs/gm5/T_Aurigma_GraphicsMill_BitmapData.htm.md).
 
**Note** 
Array channel number (third dimension) must conform pixel format specified by *format* argument.

 - format
     - Type: [Aurigma.GraphicsMill.PixelFormat](https://www.graphicsmill.com/docs/gm5/T_Aurigma_GraphicsMill_PixelFormat.htm.md)
 [PixelFormat](https://www.graphicsmill.com/docs/gm5/T_Aurigma_GraphicsMill_PixelFormat.htm.md) value that describes pixel format for the pixels in the specified array.

 - profile
     - Type: [Aurigma.GraphicsMill.ColorProfile](https://www.graphicsmill.com/docs/gm5/T_Aurigma_GraphicsMill_ColorProfile.htm.md)
 [ColorPalette](https://www.graphicsmill.com/docs/gm5/T_Aurigma_GraphicsMill_ColorPalette.htm.md) class instance that is used as an input profile.
 
### Return Value
An array of integers in the same format as input *array*. Pixel format that describes an order of channels is stored at [DestinationPixelFormat](https://www.graphicsmill.com/docs/gm5/P_Aurigma_GraphicsMill_Transforms_PixelFormatConverter_DestinationPixelFormat.htm.md) property.
 
## Remarks
  
The destination pixel format is specified by [DestinationPixelFormat](https://www.graphicsmill.com/docs/gm5/P_Aurigma_GraphicsMill_Transforms_PixelFormatConverter_DestinationPixelFormat.htm.md) property.
 
During conversion with this method, the color management will be applied. Argument *profile* will be used as an input profile, output profiles are specified by [CmykColorProfile](https://www.graphicsmill.com/docs/gm5/P_Aurigma_GraphicsMill_Transforms_PixelFormatConverter_CmykColorProfile.htm.md), [RgbColorProfile](https://www.graphicsmill.com/docs/gm5/P_Aurigma_GraphicsMill_Transforms_PixelFormatConverter_RgbColorProfile.htm.md), and [GrayScaleColorProfile](https://www.graphicsmill.com/docs/gm5/P_Aurigma_GraphicsMill_Transforms_PixelFormatConverter_GrayScaleColorProfile.htm.md) properties. Property [TargetColorProfile](https://www.graphicsmill.com/docs/gm5/P_Aurigma_GraphicsMill_Transforms_PixelFormatConverter_TargetColorProfile.htm.md) will be used as well.
 
**Note** 
If output profile is not specified or [ColorManagementEngine](https://www.graphicsmill.com/docs/gm5/P_Aurigma_GraphicsMill_Transforms_PixelFormatConverter_ColorManagementEngine.htm.md) property is [None](https://www.graphicsmill.com/docs/gm5/T_Aurigma_GraphicsMill_Transforms_ColorManagementEngine.htm.md), color management is disabled.
   
## See Also

### Reference

- [PixelFormatConverter Class](https://www.graphicsmill.com/docs/gm5/T_Aurigma_GraphicsMill_Transforms_PixelFormatConverter.htm.md)
- [ConvertArray Overload](https://www.graphicsmill.com/docs/gm5/O_T_Aurigma_GraphicsMill_Transforms_PixelFormatConverter_ConvertArray.htm.md)
- [Aurigma.GraphicsMill.Transforms Namespace](https://www.graphicsmill.com/docs/gm5/N_Aurigma_GraphicsMill_Transforms.htm.md)
