---
title: "Maximum"
canonical: https://www.graphicsmill.com/samples/Transforms/MinimumMaximumMedian/Maximum_cs
product: "Graphics Mill"
source: "Transforms/MinimumMaximumMedian/Maximum.cs"
---

# Maximum

Applies the Maximum transform to the image.

## Instruction

Apply the "Maximum" transform to the image, modifying the image using the specified parameter of 3.

## Code Snippet

```csharp
using (var bitmap = new Bitmap("Chicago.jpg"))
{
    bitmap.Transforms.Maximum(3);

    bitmap.Save("Maximum.jpg");
}
```

## Explanation

The code:

- Loads the image.
- Applies the "Maximum" transform with a specified parameter value of 3.
- Saves the modified image to a new file.

## Tags

- [Bitmap](<https://www.graphicsmill.com/samples/tags/bitmap_md>): Working with images via the Bitmap API
- [Transform](<https://www.graphicsmill.com/samples/tags/transform_md>): Image transforms and effects

## Input

- [Chicago.jpg](<https://www.graphicsmill.com/samples/Transforms/compiled/Debug/Chicago_jpg>) (preview)

## Output

- [Maximum.jpg](<https://www.graphicsmill.com/samples/Transforms/compiled/Debug/Maximum_jpg>) (preview)

## Used APIs

- [Aurigma.GraphicsMill.Bitmap.Transforms](<https://www.graphicsmill.com/docs/gm/P_Aurigma_GraphicsMill_Bitmap_Transforms.htm.md>)
- [Aurigma.GraphicsMill.TransformsProvider.Maximum(Int32)](<https://www.graphicsmill.com/docs/gm/M_Aurigma_GraphicsMill_TransformsProvider_Maximum_1_e1836fc4.htm.md>)
