---
title: "ApplyMatrixTransform Class"
canonical: https://www.graphicsmill.com/docs/gm5/T_Aurigma_GraphicsMill_Transforms_ApplyMatrixTransform.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/)

# ApplyMatrixTransform Class
 
This class enables you to apply an arbitrary convex linear transformation on the bitmap (such as perspective distortion, rotation, skew, etc).
 
**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 NotInheritable Class ApplyMatrixTransform _Inherits BitmapTransform
```
 
```csharp
public sealed class ApplyMatrixTransform : BitmapTransform
```
 
## Remarks
  
To apply a transfomation, you should build a matrix of the linear transformation (see [Matrix](https://www.graphicsmill.com/docs/gm5/T_Aurigma_GraphicsMill_Transforms_Matrix.htm.md) class for more details). This matrix allows to specify both affine and projective transformation. The only limitation - the matrix should not be singular (i.e. transformation must be convex). Put this matrix to the [Transform](https://www.graphicsmill.com/docs/gm5/P_Aurigma_GraphicsMill_Transforms_ApplyMatrixTransform_Transform.htm.md) property.
 
In fact, such transforms as [Resize](https://www.graphicsmill.com/docs/gm5/T_Aurigma_GraphicsMill_Transforms_Resize.htm.md) and [Rotate](https://www.graphicsmill.com/docs/gm5/T_Aurigma_GraphicsMill_Transforms_Rotate.htm.md) are special cases of the linear transformations. You can emulate these transforms by providing scaling/rotating matrix to this transform. However [Resize](https://www.graphicsmill.com/docs/gm5/T_Aurigma_GraphicsMill_Transforms_Resize.htm.md) and [Rotate](https://www.graphicsmill.com/docs/gm5/T_Aurigma_GraphicsMill_Transforms_Rotate.htm.md) are optimized and we recommend to use it when you need only to resize or rotate.
 
As for all other geometry transforms you can specify also the [InterpolationMode](https://www.graphicsmill.com/docs/gm5/P_Aurigma_GraphicsMill_Transforms_ApplyMatrixTransform_InterpolationMode.htm.md) (which affects on the algorithm speed and output quality) and [BackgroundColor](https://www.graphicsmill.com/docs/gm5/P_Aurigma_GraphicsMill_Transforms_ApplyMatrixTransform_BackgroundColor.htm.md).
 
## Inheritance Hierarchy
  
- [System.Object](http://msdn2.microsoft.com/en-us/e5kfa45b)
    - [Aurigma.GraphicsMill.SyncHandler](https://www.graphicsmill.com/docs/gm5/T_Aurigma_GraphicsMill_SyncHandler.htm.md)
        - [Aurigma.GraphicsMill.UnitConverterHandler](https://www.graphicsmill.com/docs/gm5/T_Aurigma_GraphicsMill_UnitConverterHandler.htm.md)
            - [Aurigma.GraphicsMill.Transforms.BitmapTransform](https://www.graphicsmill.com/docs/gm5/T_Aurigma_GraphicsMill_Transforms_BitmapTransform.htm.md)
                - Aurigma.GraphicsMill.Transforms.ApplyMatrixTransform
 
## Thread Safety
 Static members of this type are safe for multi-threaded operations. Instance members of this type are safe for multi-threaded operations.
 
## Object Model

[![](https://www.graphicsmill.com/docs/gm5/Aurigma.GraphicsMill_ObjectModel_284.png)](https://www.graphicsmill.com/docs/gm5/T_Aurigma_GraphicsMill_Transforms_ApplyMatrixTransform.htm.md)
![](https://www.graphicsmill.com/docs/gm5/ObjectModel1.png)[![](https://www.graphicsmill.com/docs/gm5/Aurigma.GraphicsMill_ObjectModel_285.png)](https://www.graphicsmill.com/docs/gm5/T_Aurigma_GraphicsMill_Transforms_Matrix.htm.md)
 
## Supported Pixel Formats

| Member Name | Description |
| --- | --- |
| **Format8bppIndexed** | 8 bits per pixel. Indexed. |
| **Format8bppGrayScale** | 8 bits per pixel. Grayscale. 8 bits are used for luminosity level. |
| **Format16bppGrayScale** | 16 bits per pixel. Grayscale. All 16 bits are used for luminosity level (extended pixel format). |
| **Format16bppAGrayScale** | 16 bits per pixel. Grayscale with alpha channel. 8 bits are used for alpha channel and other 8 bits are used for luminosity level. |
| **Format32bppAGrayScale** | 32 bits per pixel. Grayscale with alpha channel. 16 bits are used for alpha channel and other 16 bits are used for luminosity level (extended pixel format). |
| **Format16bppRgb565** | 16 bits per pixel. RGB. 5 bits each are used for the red, and blue components. 6 bits are used for green component. |
| **Format16bppRgb555** | 16 bits per pixel. RGB. 5 bits each are used for the red, green, and blue components. The rest bit is unused. |
| **Format16bppArgb1555** | 16 bits per pixel. RGB with alpha channel. 1 bit is used for the alpha component, and 5 bits each are used for the red, green, and blue components. |
| **Format24bppRgb** | 24 bits per pixel. RGB. 8 bits each are used for the red, green, and blue components. |
| **Format32bppRgb** | 32 bits per pixel. RGB. 8 bits each are used for the red, green, and blue components. The rest 8 bits are unused. |
| **Format32bppArgb** | 32 bits per pixel. RGB with alpha channel. 8 bits each are used for the alpha, red, green, and blue components. |
| **Format48bppRgb** | 48 bits per pixel. RGB. 16 bits each are used for the red, green, and blue components (extended pixel format). |
| **Format64bppArgb** | 64 bits per pixel. RGB with alpha channel. 16 bits each are used for the alpha, red, green, and blue components (extended pixel format). |
| **Format32bppCmyk** | 32 bits per pixel. CMYK. 8 bits each are used for the cyan, magenta, yellow, and black components. |
| **Format64bppCmyk** | 64 bits per pixel. CMYK. 16 bits each are used for the cyan, magenta, yellow, and black components (extended pixel format). |
| **Format80bppAcmyk** | 80 bits per pixel. CMYK with alpha channel. 16 bits each are used for the alpha, cyan, magenta, yellow, and black components (extended pixel format). |
 
## See Also

### Reference

- [ApplyMatrixTransform Members](https://www.graphicsmill.com/docs/gm5/AllMembers_T_Aurigma_GraphicsMill_Transforms_ApplyMatrixTransform.htm.md)
- [Aurigma.GraphicsMill.Transforms Namespace](https://www.graphicsmill.com/docs/gm5/N_Aurigma_GraphicsMill_Transforms.htm.md)
- [Aurigma.GraphicsMill.Transforms.Matrix](https://www.graphicsmill.com/docs/gm5/T_Aurigma_GraphicsMill_Transforms_Matrix.htm.md)
