normalize

The normalize transformation automatically stretches the image's contrast and brightness to use the full tonal range. Perfect for enhancing flat, washed-out photos or automatically improving image quality without manual adjustments.

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/normalize:percent=PERCENT/ASSET_ID.jpg

Examples

Standard Normalization

curl -i GET https://media.vyso.io/normalize/ASSET_ID.jpg

Normalize with 5% Contrast Stretch

curl -i GET https://media.vyso.io/normalize:percent=0.05/ASSET_ID.jpg

Normalize with 2% Stretch

curl -i GET https://media.vyso.io/normalize:percent=0.02/ASSET_ID.jpg

Aggressive Normalization

curl -i GET https://media.vyso.io/normalize:percent=0.1/ASSET_ID.jpg

Light Normalization

curl -i GET https://media.vyso.io/normalize:percent=0.01/ASSET_ID.jpg

On 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

percentOPTIONAL

Percent clipping for contrast stretch. Accepted values:

  • Range: 0.0 to 0.5
  • 0.02 - Standard normalization (default)
  • 0.01 - Light enhancement
  • 0.05 - Aggressive stretching
  • Higher values clip more pixels for stronger contrast

Response

The API returns a normalized version of the image with enhanced contrast and brightness spanning the full tonal range. 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)