Contrast Adjustment
Adjust the contrast of an image
/v1/image/adjust/contrast
curl "https://image.toolkitapi.io/v1/image/adjust/contrast?url=https://toolkitapi.io/static/samples/sample-image.png&factor=1.6&format=jpeg"
import httpx
resp = httpx.get(
"https://image.toolkitapi.io/v1/image/adjust/contrast?url=https://toolkitapi.io/static/samples/sample-image.png&factor=1.6&format=jpeg",
)
print(resp.json())
const resp = await fetch("https://image.toolkitapi.io/v1/image/adjust/contrast?url=https://toolkitapi.io/static/samples/sample-image.png&factor=1.6&format=jpeg", {
});
const data = await resp.json();
console.log(data);
# See curl example
{
"image": "/9j/4AAQSkZJRgABAQ...(base64 data)...",
"format": "jpeg",
"factor": 1.6
}
Try It Live
Description
How to Use
1. Provide the source image via the `url` query parameter.
2. Set the `factor` parameter to control the adjustment intensity (1.0 = no change).
3. Choose your preferred output `format` (png, jpeg, or webp) and `quality` level.
About This Tool
Use the Contrast Adjustment endpoint to increase or decrease the contrast of an image. The factor controls intensity: 1.0 is unchanged, below 1.0 flattens contrast (grey wash), and above 1.0 boosts it (punchier shadows and highlights).
Contrast adjustment is essential for photo editing workflows, improving readability of scanned documents, and creating high-impact visuals. The endpoint uses PIL's ImageEnhance.Contrast for perceptually balanced results.
Why Use This Tool
- Photo enhancement — Make dull or flat images more vibrant and dynamic
- Document processing — Improve text-background separation in scans
- Social media content — Create high-impact visuals with punchy contrast
- Pre-print preparation — Adjust contrast for optimal print reproduction
Frequently Asked Questions
What does a factor of 0.0 produce?
Can I use this to improve scanned documents?
How does contrast interact with brightness?
Start using Contrast Adjustment now
Get your free API key and make your first request in under a minute.