Channel Balance

Color Adjustment Bitmap

Modifies channel balance.

Сode 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

Output

ChannelBalance.jpg

For AI-assisted development: Download Graphics Mill Code Samples XML Catalog