---
title: "Remove Alpha Channel"
canonical: https://www.graphicsmill.com/samples/ColorManagement/Channels/RemoveAlphaChannel_cs
product: "Graphics Mill"
source: "ColorManagement/Channels/RemoveAlphaChannel.cs"
---

# Remove Alpha Channel

Removes alpha channel and replaces it with a solid color.

## Instruction

Demonstrates how to remove the alpha channel from an image.

## Code Snippet

```csharp
using (var bitmap = new Bitmap("Stamp.png"))
{
    bitmap.Channels.RemoveAlpha(RgbColor.WhiteSmoke);

    bitmap.Save("RemoveAlphaChannel.png");
}
```

## Explanation

The following code:

- Reads a PNG image (`Stamp.png`) using `Bitmap`.
- Removes the alpha channel from the image using `RemoveAlpha()`.
- Saves the resulting image without the alpha channel to `RemoveAlphaChannel.png`.

## Tags

- [Bitmap](<https://www.graphicsmill.com/samples/tags/bitmap_md>): Working with images via the Bitmap API
- [Channels](<https://www.graphicsmill.com/samples/tags/channels_md>): Reading and combining image channels

## Input

- [Stamp.png](<https://www.graphicsmill.com/samples/ColorManagement/compiled/Debug/Stamp_png>) (preview)

## Output

- [RemoveAlphaChannel.png](<https://www.graphicsmill.com/samples/ColorManagement/compiled/Debug/RemoveAlphaChannel_png>) (preview)

## Used APIs

- [Aurigma.GraphicsMill.Bitmap.Channels](<https://www.graphicsmill.com/docs/gm/P_Aurigma_GraphicsMill_Bitmap_Channels.htm.md>)
- [Aurigma.GraphicsMill.ChannelsProvider.RemoveAlpha(Color)](<https://www.graphicsmill.com/docs/gm/M_Aurigma_GraphicsMill_ChannelsProvider_RemoveAlpha_1_929597d9.htm.md>)
