Colord.It8

g Colord.It8 Colord.It8 GObject.Object GObject.Object GObject.Object->Colord.It8

Subclasses:

None

Methods

Inherited:

GObject.Object (37)

Structs:

GObject.ObjectClass (5)

class

error_quark ()

class

new ()

class

new_with_kind (kind)

add_data (rgb, xyz)

add_option (option)

add_spectrum (spectrum)

get_data_item (idx, rgb, xyz)

get_data_size ()

get_enable_created ()

get_instrument ()

get_kind ()

get_matrix ()

get_normalized ()

get_originator ()

get_reference ()

get_spectral ()

get_spectrum_array ()

get_spectrum_by_id (id)

get_title ()

get_xyz_for_rgb (R, G, B, delta)

has_option (option)

load_from_data (data)

load_from_file (file)

save_to_data (data)

save_to_file (file)

set_enable_created (enable_created)

set_instrument (instrument)

set_kind (kind)

set_matrix (matrix)

set_normalized (normalized)

set_originator (originator)

set_reference (reference)

set_spectral (spectral)

set_spectrum_array (data)

set_title (title)

Virtual Methods

Inherited:

GObject.Object (7)

Properties

Name

Type

Flags

Short Description

instrument

str

r

kind

int

r/w

normalized

bool

r

originator

str

r

reference

str

r

spectral

bool

r

title

str

r

Signals

Inherited:

GObject.Object (1)

Fields

Inherited:

GObject.Object (1)

Name

Type

Access

Description

parent_instance

GObject.Object

r

Class Details

class Colord.It8(**kwargs)
Bases:

GObject.Object

Abstract:

No

Structure:

Colord.It8Class

classmethod error_quark()[source]
Returns:

An error quark.

Return type:

int

New in version 0.1.0.

classmethod new()[source]
Returns:

a new Colord.It8 object.

Return type:

Colord.It8

Creates a new Colord.It8 object.

New in version 0.1.20.

classmethod new_with_kind(kind)[source]
Parameters:

kind (Colord.It8Kind) – a Colord.It8Kind, e.g Colord.It8Kind.TI3.

Returns:

a new Colord.It8 object.

Return type:

Colord.It8

Creates a new Colord.It8 object.

New in version 0.1.20.

add_data(rgb, xyz)[source]
Parameters:

Adds a reading to this object. If either of rgb or xyz is None then a black reading (0.0, 0.0, 0.0) is added instead.

New in version 0.1.20.

add_option(option)[source]
Parameters:

option (str) – A IT8 option, e.g. “TYPE_LCD”

Sets any extra options that have to be set in the CCMX file

New in version 0.1.20.

add_spectrum(spectrum)[source]
Parameters:

spectrum (Colord.Spectrum) – the spectral data

Adds a spectrum to the spectral array.

New in version 1.1.6.

get_data_item(idx, rgb, xyz)[source]
Parameters:
Returns:

True if the index existed.

Return type:

bool

Gets a specific bit of data from this object. The returned data are absolute readings and are not normalised.

New in version 0.1.20.

get_data_size()[source]
Returns:

The number of RGB-XYZ readings in this object.

Return type:

int

Gets the data size.

New in version 0.1.20.

get_enable_created()[source]
Returns:

The reference, or None if unset

Return type:

bool

Gets if the ‘CREATED’ attribute will be written. This is typically only set in the self test programs.

New in version 0.1.33.

get_instrument()[source]
Returns:

The instrument, or None if unset

Return type:

str

Gets the instrument the file was created by.

New in version 0.1.20.

get_kind()[source]
Returns:

a Colord.It8Kind, e.g Colord.It8Kind.TI3.

Return type:

Colord.It8Kind

Gets the kind of IT8 file.

New in version 0.1.20.

get_matrix()[source]
Returns:

a Colord.Mat3x3.

Return type:

Colord.Mat3x3

Gets the calibration matrix in the it8 file.

New in version 0.1.20.

get_normalized()[source]
Returns:

True if the data should be normalised.

Return type:

bool

Gets if the data should be written normlaised to y=100.

New in version 0.1.20.

get_originator()[source]
Returns:

The originator, or None if unset

Return type:

str

Gets the file orginator.

New in version 0.1.20.

get_reference()[source]
Returns:

The reference, or None if unset

Return type:

str

Gets the reference the file was created against.

New in version 0.1.20.

get_spectral()[source]
Returns:

True if the data is in spectral bands.

Return type:

bool

Gets if the data is spectral or XYZ.

New in version 0.1.20.

get_spectrum_array()[source]
Returns:

spectral data

Return type:

[Colord.Spectrum]

Gets the spectral data of IT8 file.

New in version 1.1.6.

get_spectrum_by_id(id)[source]
Parameters:

id (str) – the spectrum ID value

Returns:

spectrum, or None

Return type:

Colord.Spectrum

Gets a specific spectrum in an IT8 file.

New in version 1.1.6.

get_title()[source]
Returns:

The title, or None if unset

Return type:

str

Gets the file title.

New in version 0.1.20.

get_xyz_for_rgb(R, G, B, delta)[source]
Parameters:
  • R (float) – the red value

  • G (float) – the green value

  • B (float) – the blue value

  • delta (float) – the smallest difference between colors, e.g. 0.01f

Returns:

A Colord.ColorXYZ, or None if the sample does not exist.

Return type:

Colord.ColorXYZ

Gets the XYZ value for a specific RGB value.

New in version 1.2.6.

has_option(option)[source]
Parameters:

option (str) – a option, e.g. “TYPE_CRT”

Returns:

True if the option is set

Return type:

bool

Finds an option in the file.

New in version 0.1.20.

load_from_data(data)[source]
Parameters:

data ([str]) – text data

Raises:

GLib.Error

Returns:

True if a valid it8 file was read.

Return type:

bool

Loads a it8 file from data.

New in version 0.1.20.

load_from_file(file)[source]
Parameters:

file (Gio.File) – a Gio.File

Raises:

GLib.Error

Returns:

True if a valid it8 file was read.

Return type:

bool

Loads a it8 file from disk.

New in version 0.1.20.

save_to_data(data)[source]
Parameters:

data ([str]) – a pointer to returned data

Raises:

GLib.Error

Returns:

True if it8 file was saved.

Return type:

bool

Saves a it8 file to an area of memory.

New in version 0.1.26.

save_to_file(file)[source]
Parameters:

file (Gio.File) – a Gio.File

Raises:

GLib.Error

Returns:

True if it8 file was saved.

Return type:

bool

Saves a it8 file to disk

New in version 0.1.20.

set_enable_created(enable_created)[source]
Parameters:

enable_created (bool) – Is ‘CREATED’ should be written

Sets if the ‘CREATED’ attribute should be written. This is mainly useful in the self test programs where we want to string compare the output data with a known reference.

New in version 0.1.33.

set_instrument(instrument)[source]
Parameters:

instrument (str) – the instruemnt name, e.g. “huey”

Sets the measuring instrument that created the .it8 file

New in version 0.1.20.

set_kind(kind)[source]
Parameters:

kind (Colord.It8Kind) – a Colord.It8Kind, e.g Colord.It8Kind.TI3.

Set the kind of IT8 file.

New in version 0.1.20.

set_matrix(matrix)[source]
Parameters:

matrix (Colord.Mat3x3) – a Colord.Mat3x3.

Set the calibration matrix in the it8 file.

New in version 0.1.20.

set_normalized(normalized)[source]
Parameters:

normalized (bool) – If the data is normalized

Sets if normalized data should be written to the .it8 file.

New in version 0.1.20.

set_originator(originator)[source]
Parameters:

originator (str) – the program name, e.g. “gcm-calibrate”

Sets the program name that created the .it8 file

New in version 0.1.20.

set_reference(reference)[source]
Parameters:

reference (str) – the instruemnt name, e.g. “colormunki”

Sets the reference that as used to create the .it8 reference

New in version 0.1.20.

set_spectral(spectral)[source]
Parameters:

spectral (bool) – If the data is spectral

Sets if spectral data should be written to the .it8 file.

New in version 0.1.20.

set_spectrum_array(data)[source]
Parameters:

data ([Colord.Spectrum]) – the spectral data

Set the spectral data

New in version 1.1.6.

set_title(title)[source]
Parameters:

title (str) – the title name, e.g. “Factory calibration”

Sets the display name for the file.

New in version 0.1.20.

Property Details

Colord.It8.props.instrument
Name:

instrument

Type:

str

Default Value:

None

Flags:

READABLE

The instrument that created the results, e.g. “huey”

New in version 0.1.20.

Colord.It8.props.kind
Name:

kind

Type:

int

Default Value:

0

Flags:

READABLE, WRITABLE

The kind of IT8 file.

New in version 0.1.20.

Colord.It8.props.normalized
Name:

normalized

Type:

bool

Default Value:

False

Flags:

READABLE

If the results file is normalized.

New in version 0.1.20.

Colord.It8.props.originator
Name:

originator

Type:

str

Default Value:

None

Flags:

READABLE

The framework that created the results, e.g. “cd-self-test”

New in version 0.1.20.

Colord.It8.props.reference
Name:

reference

Type:

str

Default Value:

None

Flags:

READABLE

The reference that created the results, e.g. “colormunki”

New in version 0.1.20.

Colord.It8.props.spectral
Name:

spectral

Type:

bool

Default Value:

False

Flags:

READABLE

If the results file is spectral.

New in version 0.1.20.

Colord.It8.props.title
Name:

title

Type:

str

Default Value:

None

Flags:

READABLE

The file title, e.g. “Factor calibration”.

New in version 0.1.20.