Perceptual greyscale luminance and Web Worker speed
This tool converts color images to monochrome inside your browser using perceptual luminance math rather than a naive channel average. As defined in W3C CSS Color Module Level 4 Relative Luminance, sRGB relative luminance weights each pixel at 0.2126 R + 0.7152 G + 0.0722 B (ITU-R BT.709).
If your shot has distracting background clutter around the subject, trim distractions from your portrait before converting so the tonal range focuses on what matters.
Why Rec. 709 luminance beats simple RGB averaging
Averaging (R + G + B) / 3 treats red, green, and blue equally, which makes bright green grass look too dark and deep blue skies look overly bright. Weighting green at 71.52% matches how human cone cells perceive brightness, keeping skin tones, leaves, and clouds balanced.
For Sepia (old photo), the processor applies a warm vintage matrix (0.393 R + 0.769 G + 0.189 B for red, 0.349 R + 0.686 G + 0.168 B for green, and 0.272 R + 0.534 G + 0.131 B for blue) clamped at 255.
Off-thread pixel processing with a 480 px live preview
When you select a file, a lightweight 480 px preview canvas updates immediately as you switch Style options or drag Cut-off. Full-resolution exports transfer the raw pixel buffer to a Comlink Web Worker via runImageTask("mono", ...) so the browser tab stays responsive even on large batches.
Because the worker processes transferable ArrayBuffer memory off the main thread, converting a batch of multi-megapixel photos will not freeze scrolling or button clicks.
When you switch between modes on the live preview, mono() updates only the 480 px canvas copy so adjustments feel instant even on older laptops. Only when you click Convert image does the worker run across the full source resolution.
What is the difference between greyscale and pure black and white?
Greyscale maps every pixel onto 256 shades of grey (0 to 255) so portraits and landscapes retain smooth gradients and midtone detail. Pure black and white converts every pixel strictly to solid black (0) or solid white (255) using a single brightness threshold with zero intermediate greys.
| Style option | Output tones | Formula or threshold | Best use case |
|---|---|---|---|
| Black and white (greyscale) | 256 grey levels | 0.2126R + 0.7152G + 0.0722B |
Balanced portraits and street photos |
| Black and white, high contrast | 256 grey levels (stretched) | (y - 128) * 1.45 + 128 |
Moody architecture and dramatic shots |
| Pure black and white (no greys) | 2 tones (black or white) | y >= threshold ? 255 : 0 |
Signatures, line art, and scanned text |
| Sepia (old photo) | Warm brown monochrome | Standard 3×3 sepia matrix | Vintage prints and archival aesthetics |
Under the MDN CanvasRenderingContext2D.getImageData() Reference, each mode reads the Uint8ClampedArray RGBA buffer directly. If you need to strip color from multi-page documents instead of photos, try the browser-based PDF greyscale tool.
Tuning the Cut-off slider for signatures and scans
Selecting Pure black and white (no greys) reveals the Cut-off slider ranging from 20 to 235 with a default of 128. Every pixel whose Rec. 709 luminance meets or exceeds that value snaps to white (255), while darker pixels snap to black (0).
Choosing a Cut-off between 20 and 235
Phone photos of handwritten signatures or receipts often suffer from uneven desk shadows that turn grey in standard monochrome mode. Raising Cut-off slightly above 128 pushes off-white paper grain to pure white while keeping dark ink crisp.
If fine pen strokes start breaking up, slide Cut-off lower toward 80 or 100 until every stroke connects cleanly in the live preview.
Threshold mode works best on flat-lit scans, receipts, and line drawings where you want crisp two-tone output with zero mid-grey speckles in the background.
Using high-contrast monochrome for dramatic portraits
Black and white, high contrast keeps smooth tonal transitions while multiplying deviation from mid-grey (128) by 1.45. Highlights brighten and shadows deepen without clipping midtones into harsh two-tone edges.
As noted in the MDN HTMLCanvasElement.toBlob() Reference, finished exports encode at 0.92 quality for lossy formats. Once converted, you can frame monochrome prints with clean gallery margins for a classic darkroom presentation.
Format preservation, transparency, and metadata removal
Processed files keep the same format as your source image whenever possible, appending -bw (or -sepia for sepia) before the file extension. Single images download directly, while multi-image batches bundle into a single ZIP archive.
Keeping alpha transparency on PNG and WebP files
Because the pixel loop only overwrites the red, green, and blue bytes, the alpha byte (data[i + 3]) stays intact on PNG and WebP files. Under the W3C Portable Network Graphics (PNG) Specification Third Edition, transparent logos and stickers remain see-through after monochrome conversion.
For JPG outputs, which lack an alpha channel, transparent pixels are filled with solid white (#ffffff) before encoding. Oversized inputs exceeding 4096 px on a side are scaled proportionally to fit browser canvas limits.
Tip: When prepping scanned black-and-white documents for email, click Compress on the result screen afterward to shrink large PNG scans into compact WebP or JPG files.
Batch ZIP downloads and automatic EXIF stripping
Every image passes through local createImageBitmap() decoding and canvas re-encoding, which strips original camera EXIF and GPS tags automatically. After exporting, you can stamp a subtle signature mark onto finished prints before publishing online.
When you drop multiple photos, Convert N images processes every item in sequence and packages the results into one ZIP archive with unique filenames.