Remove Alpha Channel

View as Markdown

BitmapChannels

Removes alpha channel and replaces it with a solid color.

Code Snippet

using (var bitmap = new Bitmap("Stamp.png"))
{
    bitmap.Channels.RemoveAlpha(RgbColor.WhiteSmoke);

    bitmap.Save("RemoveAlphaChannel.png");
}

Input

Stamp.png

Stamp.png

Output

RemoveAlphaChannel.png

RemoveAlphaChannel.png

Used APIs