TransferParameters

Class

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(https://d.android.com/reference/android/graphics/ColorSpace.Rgb.TransferParameters)

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
  • d is in the range 0..1
  • The function is not constant
  • The function is positive and increasing