Channel Balance

View as Markdown

BitmapColor Adjustment

Modifies channel balance.

Code Snippet

using (var bitmap = new Bitmap("Chicago.jpg"))
{
    // Pixel format specifies the order of channels
    // Example: Format24bppRgb - [Blue]|[Green]|[Red]
    // http://www.graphicsmill.com/docs/gm/accessing-pixel-data.htm#PixelsInMemory
    bitmap.ColorAdjustment.ChannelBalance(new float[] { 0.0f, 0.0f, 0.3f }, new float[] { 1f, 1f, 1f });

    bitmap.Save("ChannelBalance.jpg");
}

Input

Chicago.jpg

Chicago.jpg

Output

ChannelBalance.jpg

ChannelBalance.jpg

Used APIs