- Media API
- Transformations
- Adjust
- contrast
contrast
The contrast transformation adjusts the difference between light and dark areas in an image. Increase contrast to make the image "pop" and enhance details, or decrease it for a washed-out, softer appearance. Perfect for enhancing product photography, creating dramatic effects, or softening harsh lighting.
Serving Content via CDN
The Media API is a CDN-based service that serves transformed images via GET requests. When you request a transformed image URL, the transformation is applied dynamically on the first request and then cached for subsequent requests.
URL Pattern
https://media.vyso.io/contrast:value=MULTIPLIER/ASSET_ID.jpgExamples
Standard Contrast (No Adjustment)
curl -i GET https://media.vyso.io/contrast/ASSET_ID.jpgIncrease Contrast (High)
curl -i GET https://media.vyso.io/contrast:value=1.5/ASSET_ID.jpgIncrease Contrast (Moderate)
curl -i GET https://media.vyso.io/contrast:value=1.2/ASSET_ID.jpgDecrease Contrast (Washed Out Effect)
curl -i GET https://media.vyso.io/contrast:value=0.7/ASSET_ID.jpgVery Low Contrast
curl -i GET https://media.vyso.io/contrast:value=0.5/ASSET_ID.jpgOn the first request, you'll receive a X-Cache: MISS header while the transformation is applied and cached. Subsequent requests will return X-Cache: HIT.
Parameters
valueREQUIREDThe contrast multiplier factor to apply. Accepted values:
- Range: 0.0 to 3.0+
1.0- Original contrast (default, no change)- Values above 1.0 (e.g.,
1.5) - Increase contrast, make image "pop" - Values below 1.0 (e.g.,
0.7) - Decrease contrast, soften the image - Decimal values are supported for fine-tuned adjustments
Response
The API returns an image with the specified contrast applied. Higher values create more dramatic differences between light and dark areas, while lower values create a flattened, softer look. The response format depends on the format of the asset stored in the Vyso asset cloud.
Content-Type: Determined by the stored asset format (e.g., image/jpeg, image/png)