---
title: "MatrixTransform Class"
canonical: https://www.graphicsmill.com/docs/gm/T_Aurigma_GraphicsMill_Transforms_MatrixTransform.htm
product: "Graphics Mill"
---

# MatrixTransform Class
 
Applies an arbitrary convex linear transformation to an image (such as perspective distortion, rotation, skew, etc).
 
**Namespace:** [Aurigma.GraphicsMill.Transforms](https://www.graphicsmill.com/docs/gm/N_Aurigma_GraphicsMill_Transforms.htm.md)
 **Assembly:** Aurigma.GraphicsMill (in Aurigma.GraphicsMill.dll)
 
## Syntax
  
```csharp
public sealed class MatrixTransform : Transform
```
 
## Remarks
  
To apply a transfomation (both affine and projective), you should create a matrix of the linear transformation (see [Matrix](https://www.graphicsmill.com/docs/gm/T_Aurigma_GraphicsMill_Transforms_Matrix.htm.md) class for more details). The only limitation - the matrix should not be singular (i.e. transformation must be convex). Put this matrix to the [Matrix](https://www.graphicsmill.com/docs/gm/P_Aurigma_GraphicsMill_Transforms_MatrixTransform_Matrix.htm.md) property.
 
In fact, such transforms as [Resize](https://www.graphicsmill.com/docs/gm/T_Aurigma_GraphicsMill_Transforms_Resize.htm.md) and [Rotate](https://www.graphicsmill.com/docs/gm/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/gm/T_Aurigma_GraphicsMill_Transforms_Resize.htm.md) and [Rotate](https://www.graphicsmill.com/docs/gm/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 the [InterpolationMode](https://www.graphicsmill.com/docs/gm/P_Aurigma_GraphicsMill_Transforms_MatrixTransform_InterpolationMode.htm.md) (which affects on the algorithm speed and output quality) and [BackgroundColor](https://www.graphicsmill.com/docs/gm/P_Aurigma_GraphicsMill_Transforms_MatrixTransform_BackgroundColor.htm.md).
 
## Inheritance Hierarchy
  
- System.Object
    - [Aurigma.GraphicsMill.PipelineElement](https://www.graphicsmill.com/docs/gm/T_Aurigma_GraphicsMill_PipelineElement.htm.md)
        - [Aurigma.GraphicsMill.Transforms.Transform](https://www.graphicsmill.com/docs/gm/T_Aurigma_GraphicsMill_Transforms_Transform.htm.md)
            - Aurigma.GraphicsMill.Transforms.MatrixTransform
 
## Thread Safety
 Static members of this type are not safe for multi-threaded operations. Instance members of this type are not safe for multi-threaded operations.
   
## See Also

### Reference

- [MatrixTransform Members](https://www.graphicsmill.com/docs/gm/AllMembers_T_Aurigma_GraphicsMill_Transforms_MatrixTransform.htm.md)
- [Aurigma.GraphicsMill.Transforms Namespace](https://www.graphicsmill.com/docs/gm/N_Aurigma_GraphicsMill_Transforms.htm.md)
- [Aurigma.GraphicsMill.Transforms.Matrix](https://www.graphicsmill.com/docs/gm/T_Aurigma_GraphicsMill_Transforms_Matrix.htm.md)
