Class

TransferParameters

Defines the parameters for the ICC parametric curve type 4, as defined in ICC.1:2004-10, section 10.15.

RevenueCat

RevenueCat

Add subscriptions to your apps in minutes

Ad Get started for free
Common
data class TransferParameters(
    /** Value g in the equation of the EOTF described above. */
    val gamma: Double,
    /** Value a in the equation of the EOTF described above. */
    val a: Double,
    /** Value b in the equation of the EOTF described above. */
    val b: Double,
    /** Value c in the equation of the EOTF described above. */
    val c: Double,
    /** Value d in the equation of the EOTF described above. */
    val d: Double,
    /** Value e in the equation of the EOTF described above. */
    val e: Double = 0.0,
    /** Value f in the equation of the EOTF described above. */
    val f: Double = 0.0,
)

Defines the parameters for the ICC parametric curve type 4, as defined in ICC.1:2004-10, section 10.15.

The EOTF is of the form linked here

The corresponding OETF is simply the inverse function.

The parameters defined by this class form a valid transfer function only if all the following conditions are met:

  • No parameter is a [Not-a-Number]Double.isNaN
  • d is in the range [0..1]
  • The function is not constant
  • The function is positive and increasing