Contents

calculateHDRStats(for:)

Given a Core Image image, use the receiving Core Image context to calculate its HDR statistics (content headroom and content average light level) and then return a new Core Image image that has the calculated values.

Declaration

func calculateHDRStats(for image: CIImage) -> CIImage?

Parameters

  • image:

    An immutable Ciimage for which to calculate statistics.

Return Value

Returns a new CIImage instance that has the calculated statistics attached.

Discussion

If the image extent is not finite, then nil will be returned.