Contrast

class Contrast(val factor: Float) : EffectSpec(source)

Stretch or flatten every color channel about mid grey.

Each channel moves away from the middle of the encoded range by factor, so 2f doubles the distance from mid grey and 0.5f halves it. The pivot is the encoded signal's midpoint, which is what filter: contrast() in a browser pivots on, and a channel that stretches past black or white clamps there.

On an export that keeps an HDR grade the pivot is the light that midpoint makes on an SDR display at reference white, about 44 cd/m2, and a channel stretches up to the format's peak rather than to white.

Throws

when factor is not a finite number.

Constructors

Link copied to clipboard
constructor(factor: Float)

Properties

Link copied to clipboard
Link copied to clipboard

The gain about mid grey, where 1f leaves the frame unchanged and 0f paints the whole frame mid grey. Negative values are read as 0f.

Link copied to clipboard
open override val id: String
Link copied to clipboard
open val isInert: Boolean
Link copied to clipboard
Link copied to clipboard
open val scope: EffectScope
Link copied to clipboard
open override val stage: EffectStage