channelManipulation

The channelManipulation transformation allows advanced control over individual color channels (red, green, blue), enabling channel scaling, mixing, and custom color transformations. Perfect for color grading, channel swapping, and advanced color effects.

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/channelManipulation:red=R:green=G:blue=B/ASSET_ID.jpg

Examples

Boost Red Channel

curl -i GET https://media.vyso.io/channelManipulation:red=1.5/ASSET_ID.jpg

Reduce Green Channel

curl -i GET https://media.vyso.io/channelManipulation:green=0.5/ASSET_ID.jpg

Enhance Blue, Reduce Red

curl -i GET https://media.vyso.io/channelManipulation:red=0.7:blue=1.3/ASSET_ID.jpg

Channel Mixing (Swap Red and Green)

curl -i GET https://media.vyso.io/channelManipulation:red=0:green=1:blue=0/ASSET_ID.jpg

Enhance All Channels

curl -i GET https://media.vyso.io/channelManipulation:red=1.2:green=1.2:blue=1.2/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

redOPTIONAL

Red channel multiplier. Accepted values:

  • Range: 0.0 to 3.0+
  • 0.5 - Reduce red by 50%
  • 1.0 - No change (baseline)
  • 1.5 - Increase red by 50%
  • 0.0 - Remove red channel completely
greenOPTIONAL

Green channel multiplier. Same range and behavior as red channel.

blueOPTIONAL

Blue channel multiplier. Same range and behavior as red channel.

Response

The API returns the channel-manipulated image. 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)