add-noise

The add-noise transformation adds controlled noise to images using various distribution types. Useful for creating grain effects, simulating film photography, data augmentation, or adding texture to smooth images.

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/add-noise:type=TYPE:amount=AMOUNT/ASSET_ID.jpg

Examples

Gaussian Noise Light

curl -i GET https://media.vyso.io/add-noise:type=gaussian:amount=0.5/ASSET_ID.jpg

Standard Gaussian Noise

curl -i GET https://media.vyso.io/add-noise:type=gaussian:amount=1.0/ASSET_ID.jpg

Uniform Noise Distribution

curl -i GET https://media.vyso.io/add-noise:type=uniform:amount=1.5/ASSET_ID.jpg

Salt and Pepper Noise

curl -i GET https://media.vyso.io/add-noise:type=salt-pepper:amount=0.8/ASSET_ID.jpg

Heavy Noise Effect

curl -i GET https://media.vyso.io/add-noise:type=gaussian:amount=3.0/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

typeOPTIONAL

Noise distribution type. Accepted values:

  • gaussian - Gaussian/normal distribution (default)
  • uniform - Uniform distribution
  • salt-pepper - Salt and pepper noise (impulse noise)
  • Gaussian: natural-looking film grain
  • Uniform: even randomness across range
  • Salt-pepper: extreme bright and dark pixels
amountREQUIRED

Noise intensity/amount. Accepted values:

  • Range: 0.1 to 10.0+
  • 0.5 - Light grain/noise
  • 1.0 - Standard noise level
  • 2.0 - Visible noise effect
  • 5.0+ - Heavy noise/grainy appearance
  • Higher values add more pronounced noise

Response

The API returns the image with added noise. 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)