negate

The negate transformation inverts all colors in an image, creating a photographic negative effect. Perfect for creating surreal artistic effects, testing color workflows, or generating alternative visual representations of 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/negate:alpha=BOOL/ASSET_ID.jpg

Examples

Standard Negation

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

Negate Without Alpha

curl -i GET https://media.vyso.io/negate:alpha=false/ASSET_ID.jpg

Full Color Inversion

curl -i GET https://media.vyso.io/negate:grayscale=false/ASSET_ID.jpg

Negate with Alpha Channel Preserved

curl -i GET https://media.vyso.io/negate:alpha=true/ASSET_ID.jpg

Complete Inversion (Standard)

curl -i GET https://media.vyso.io/negate/ASSET_ID.png

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

alphaOPTIONAL

Whether to negate the alpha channel. Accepted values:

  • true - Negate alpha channel (default)
  • false - Preserve alpha channel
  • Only relevant for images with transparency (PNG)

Response

The API returns a negated version of the image where all color values are inverted (255-value for each channel), creating a photographic negative effect. 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)