Contents

calculateHDRStats(for:)

Given a Core Graphics 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 Graphics image that has the calculated values.

Declaration

func calculateHDRStats(for cgimage: CGImage) -> CGImage

Parameters

  • cgimage:

    An immutable CGImage for which to calculate statistics.

Return Value

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