CicpParams#
Added in version 4.16.
Superclasses: Object
Contains the parameters that define a colorstate with cicp parameters.
Cicp parameters are specified in the ITU-T H.273 specification.
See the documentation of individual properties for supported values.
The ‘unspecified’ value (2) is not treated in any special way, and must be replaced by a different value before creating a color state.
GdkCicpParams can be used as a builder object to construct a color
state from Cicp data with build_color_state.
The function will return an error if the given parameters are not
supported.
You can obtain a GdkCicpParams object from a color state with
create_cicp_params. This can be used to
create a variant of a color state, by changing just one of the cicp
parameters, or just to obtain information about the color state.
Constructors#
- class CicpParams
- classmethod new() CicpParams#
Creates a new
GdkCicpParamsobject.The initial values of the properties are the values for “undefined” and need to be set before a color state object can be built.
Added in version 4.16.
Methods#
- class CicpParams
- build_color_state() ColorState#
Creates a new
GdkColorStateobject for the cicp parameters inself.Note that this may fail if the cicp parameters in
selfare not supported by GTK. In that case,NULLis returned, anderroris set with an error message that can be presented to the user.Added in version 4.16.
- get_color_primaries() int#
Returns the value of the color-primaries property of
self.Added in version 4.16.
- get_matrix_coefficients() int#
Gets the matrix-coefficients property of
self.Added in version 4.16.
- set_color_primaries(color_primaries: int) None#
Sets the color-primaries property of
self.Added in version 4.16.
- Parameters:
color_primaries – the new color primaries value
- set_matrix_coefficients(matrix_coefficients: int) None#
selfaGdkCicpParamsSets the matrix-coefficients property ofself.Added in version 4.16.
- Parameters:
matrix_coefficients – the new matrix-coefficients value
Properties#
- class CicpParams
- props.color_primaries: int#
The color primaries to use.
Supported values:
1: BT.709 / sRGB
2: unspecified
5: PAL
6,7: BT.601 / NTSC
9: BT.2020
12: Display P3
Added in version 4.16.
- props.matrix_coefficients: int#
The matrix coefficients (for YUV to RGB conversion).
Supported values:
0: RGB
1: BT.709
2: unspecified
5,6: BT.601
9: BT.2020
Added in version 4.16.