Bitmap to Grayscale Converter
Convert any bitmap image to grayscale online using 6 algorithms: Luminosity BT.709, Average, Desaturation, BT.601, Single Channel, and Custom Weights. Download as PNG or JPEG.
About
Grayscale conversion is not a single operation. At least six distinct algorithms exist, each producing visibly different results from the same source bitmap. The naΓ―ve approach - averaging R, G, and B channels - ignores the human eye's non-uniform spectral sensitivity, which peaks near 555 nm (green). The ITU-R BT.709 luminosity formula compensates for this by weighting green at 0.7152, producing perceptually accurate tonal mapping. Choosing the wrong method can flatten contrast in skin tones, destroy shadow detail in landscape photography, or produce banding artifacts in medical imaging.
This tool applies the selected algorithm directly to raw pixel data via the Canvas API. No server upload occurs. Processing is local, lossless until final export, and supports images up to 50 MB. Note: conversion assumes sRGB input. Images in Adobe RGB or ProPhoto RGB will exhibit slight tonal shifts because no color profile transformation is applied. For print workflows requiring ICC profile fidelity, a desktop application remains the correct choice.
Formulas
The general weighted grayscale conversion maps each pixel's RGB triplet to a single luminance value Y:
where R, G, B β [0, 255] are the source channel values, and wr + wg + wb = 1. The output pixel becomes (Y, Y, Y, A) where A is the original alpha value preserved unchanged.
For the ITU-R BT.709 standard (used in sRGB and HDTV):
For the desaturation method, the lightness channel from the HSL color model is extracted:
Variable legend: Y = output grayscale intensity. R, G, B = red, green, blue channel values (0 - 255). wr, wg, wb = channel weight coefficients. A = alpha (transparency) channel, unmodified.
Reference Data
| Algorithm | Formula | Best For | Perceptual Accuracy | Speed |
|---|---|---|---|---|
| Luminosity (BT.709) | 0.2126R + 0.7152G + 0.0722B | Photography, UI design | High | Fast |
| Average | (R + G + B) Γ· 3 | Quick preview, pixel art | Low | Fast |
| Desaturation (Lightness) | (max(R,G,B) + min(R,G,B)) Γ· 2 | Artistic effects, illustration | Medium | Fast |
| BT.601 (NTSC/PAL) | 0.299R + 0.587G + 0.114B | Video, legacy broadcast | Medium-High | Fast |
| Red Channel | R | Emphasizing warm tones, skin | Low | Fastest |
| Green Channel | G | Landscapes, foliage detail | Medium | Fastest |
| Blue Channel | B | Sky, water, atmospheric haze | Low | Fastest |
| Custom Weights | wrR + wgG + wbB | Fine-tuned creative control | User-defined | Fast |
| Gamma-Corrected Luminosity | Linear: (cΓ·255)2.2 | Physically accurate rendering | Highest | Slower |
| RMS (Root Mean Square) | β(R2 + G2 + B2) Γ· 3 | Signal processing | Medium | Medium |
| sRGB Luminance | BT.709 with linearization | Web-standard workflows | High | Medium |
| Human Eye Peak (Ξ») | 555 nm (photopic) | Reference wavelength | - | - |
| HDTV Rec. 2020 | 0.2627R + 0.6780G + 0.0593B | Ultra HD / HDR content | High | Fast |