dfdutils
Loading...
Searching...
No Matches
colourspaces.c File Reference

Helper functions for colourspaces. More...

#include <KHR/khr_df.h>
#include "dfd.h"

Functions

khr_df_primaries_e findMapping (const Primaries *p, float latitude)
 Map a set of primaries to a KDFS primaries enum.
bool getPrimaries (khr_df_primaries_e primaries, Primaries *p)
 Get the primaries corresponding to a KDFS primaries enum.

Detailed Description

Helper functions for colourspaces.

Function Documentation

◆ findMapping()

khr_df_primaries_e findMapping ( const Primaries * p,
float latitude )

Map a set of primaries to a KDFS primaries enum.

Parameters
[in]ppointer to a Primaries struct filled in with the primary values.
[in]latitudetolerance to use while matching. A suitable value might be 0.002 but it depends on the application.

◆ getPrimaries()

bool getPrimaries ( khr_df_primaries_e primaries,
Primaries * p )

Get the primaries corresponding to a KDFS primaries enum.

Parameters
[in]primariesthe enum identifying the KDFS primaries.
[out]ppointer to a Primaries struct that will be filled with the primary values.