Overview
Introduction
This tool darkens a JPG entirely client-side by subtracting a flat positive offset from every pixel's RGB channels.
It's a quick, single-slider way to tone down an overexposed photo or add a moodier, dimmer feel.
What Is JPG Darkener?
A client-side JPG darkening tool that reads an uploaded photo's pixel data and subtracts a uniform offset, scaled from a 0-100 amount slider, from every pixel's red, green, and blue values.
Values that would drop below 0 are simply clamped at pure black rather than wrapping around.
How JPG Darkener Works
The amount slider (0-100) is scaled linearly to a byte offset between 0 and 255, which then gets subtracted from every RGB channel of every pixel in the image.
Because the same offset is subtracted everywhere, bright highlights and dark shadows both shift down by the same absolute amount, though shadows will clamp at black sooner.
When To Use JPG Darkener
Use it on a photo that came out overexposed or too bright, or to give any image a moodier, dimmer, more dramatic tone.
It's also useful for creating darkened backdrop images meant to sit behind light-colored overlay text.
Often used alongside JPG Brightener, JPG Contrast Decreaser and PNG Brightness Changer.
Features
Advantages
- Runs entirely client-side; nothing is uploaded to a server.
- Simple single-parameter control that's easy to reason about.
- Fast, single-pass per-channel operation.
Limitations
- A flat offset can crush already-dark areas to black faster than it helps genuinely bright ones.
- Cannot recover detail that was clipped to pure white during capture.
Examples
Best Practices & Notes
Best Practices
- Start with a modest amount (15-30) and increase only as needed to avoid crushing shadow detail to black.
- Check the darkest areas of your photo after adjusting, since they clip to pure black first.
Developer Notes
darkenJpg scales a 0-100 amount to a 0-255 offset and subtracts it from each of the R, G, B channels via clampByte, leaving alpha untouched; it mirrors jpgBrightener's structure but with a subtractive rather than additive offset.
JPG Darkener Use Cases
- Toning down an overexposed photo
- Creating a moodier, dimmer visual style
- Preparing a darkened backdrop for light-colored text overlays
Common Mistakes
- Applying too high an amount and crushing shadow detail to flat black.
- Using this instead of contrast adjustment when the real issue is a flat, washed-out tonal range rather than overall brightness.
Tips
- Combine with the JPG contrast decreaser for an even flatter, moodier look.
- For photos with both bright and dark areas, consider the contrast tools instead of a flat darkening shift.