png-compressor
    Preparing search index...

    Interface IPngMetadataCalibrationOfPixelValues

    A metadata entry that indicates that the image contains physical data other than color values, for example a 2D temperature field. The resulting data might be used to construct a reference color bar beside the image, or to extract the original physical data values from the file. It is not expected to affect the way the pixels are displayed.

    interface IPngMetadataCalibrationOfPixelValues {
        calibrationName: string;
        equationType:
            | "linear-mapping"
            | "base-e exponential mapping"
            | "arbitrary-base exponential mapping"
            | "hyperbolic mapping";
        params: number[];
        type: "pCAL";
        unitName: string;
        x0: number;
        x1: number;
    }
    Index

    Properties

    calibrationName: string

    The name of the calibration mapping.

    equationType:
        | "linear-mapping"
        | "base-e exponential mapping"
        | "arbitrary-base exponential mapping"
        | "hyperbolic mapping"

    The type of equation to use in order to extract the mapped data.

    • linear-mapping:
      physical_value = p0 + p1 * original_sample / (x1-x0)
      
    • base-e exponential mapping:
      p0 + p1 * exp(p2 * original_sample / (x1-x0))
      
    • arbitrary-base exponential mapping:
      physical_value = p0 + p1 * pow(p2, (original_sample / (x1-x0)))
      
    • hyperbolic mapping:
      physical_value = p0 + p1 * sinh(p2 * (original_sample - p3) / (x1-x0))
      
    params: number[]
    type: "pCAL"

    The type of metadata, this is typically the name of the chunk from which is originates.

    unitName: string

    The unit name of the resulting data.

    x0: number
    x1: number