Colord.Icc¶
| Subclasses: | None | 
|---|
Methods¶
| Inherited: | GObject.Object (37) | 
|---|---|
| Structs: | GObject.ObjectClass (5) | 
Virtual Methods¶
| Inherited: | GObject.Object (7) | 
|---|
Properties¶
| Name | Type | Flags | Short Description | 
|---|---|---|---|
| blue | Colord.ColorXYZ | r | |
| can-delete | bool | r | |
| checksum | str | r | |
| colorspace | int | r/w | |
| filename | str | r | |
| green | Colord.ColorXYZ | r | |
| kind | int | r/w | |
| red | Colord.ColorXYZ | r | |
| size | int | r | |
| temperature | int | r | |
| version | float | r/w | |
| white | Colord.ColorXYZ | r | 
Signals¶
| Inherited: | GObject.Object (1) | 
|---|
Class Details¶
- 
class Colord.Icc(**kwargs)¶
- Bases: - GObject.Object- Abstract: - No - Structure: - Colord.IccClass- 
classmethod new()[source]¶
- Returns: - a new - Colord.Iccobject.- Return type: - Colord.Icc- Creates a new - Colord.Iccobject.- New in version 0.1.32. 
 - 
add_metadata(key, value)[source]¶
- Parameters: - Sets an item of data to the profile metadata, overwriting it if it already exists. - New in version 0.1.32. 
 - 
create_default()[source]¶
- Raises: - GLib.Error- Returns: - Truefor success- Return type: - bool- Creates a default sRGB ICC profile. - New in version 1.1.2. 
 - 
create_default_full(flags)[source]¶
- Parameters: - flags ( - Colord.IccLoadFlags) – a set of- Colord.IccLoadFlags- Raises: - GLib.Error- Returns: - Truefor success- Return type: - bool- Creates a default sRGB ICC profile. - New in version 1.4.5. 
 - 
create_from_edid(gamma_value, red, green, blue, white)[source]¶
- Parameters: - gamma_value (float) – approximate device gamma
- red (Colord.ColorYxy) – primary color value
- green (Colord.ColorYxy) – primary color value
- blue (Colord.ColorYxy) – primary color value
- white (Colord.ColorYxy) – whitepoint value
 - Raises: - Returns: - Truefor success- Return type: - Creates an ICC profile from EDID data. - New in version 0.1.32. 
- gamma_value (
 - 
create_from_edid_data(edid)[source]¶
- Parameters: - edid ( - Colord.Edid) – EDID data- Raises: - GLib.Error- Returns: - Truefor success- Return type: - bool- Creates an ICC profile from EDID data. - New in version 1.1.2. 
 - 
get_blue()[source]¶
- Returns: - the - Colord.ColorXYZvalue- Return type: - Colord.ColorXYZ- Gets the profile red chromaticity value. This function will only return results if the profile was loaded with the - Colord.IccLoadFlags.PRIMARIESflag.- New in version 0.1.32. 
 - 
get_can_delete()[source]¶
- Returns: - Trueif- Gio.File.delete() would likely work- Return type: - bool- Finds out if the profile could be deleted. This is only applicable for profiles loaded with - Colord.Icc.load_file() as obviously data and fd’s cannot be sanely unlinked.- New in version 0.1.32. 
 - 
get_characterization_data()[source]¶
- Returns: - TI3 string data - Return type: - str- Gets any characterization data used to build the profile. This function will only return results if the profile was loaded with the - Colord.IccLoadFlags.CHARACTERIZATIONflag.- New in version 1.1.1. 
 - 
get_checksum()[source]¶
- Returns: - An embedded MD5 checksum, or - Nonefor not set- Return type: - str- Gets the profile checksum if one exists. This will either be the embedded profile ID, or the file checksum if the - Colord.Iccobject was loaded using- Colord.Icc.load_data() or- Colord.Icc.load_file() and the- Colord.IccLoadFlags.FALLBACK_MD5flag is used.- New in version 0.1.32. 
 - 
get_colorspace()[source]¶
- Returns: - The profile colorspace, e.g. - Colord.Colorspace.RGB- Return type: - Colord.Colorspace- Gets the profile colorspace - New in version 0.1.32. 
 - 
get_context()[source]¶
- Returns: - Do not call cmsDeleteContext() on this value! - Return type: - objector- None- Return the cmsContext instance used locally. This may be required if you are using native LCMS calls and then - Colord.Icc.load_handle().- New in version 1.1.7. 
 - 
get_copyright(locale)[source]¶
- Parameters: - locale ( - str) – A locale, e.g. “en_GB.UTF-8” or- Nonefor the profile default- Raises: - GLib.Error- Returns: - The text as a UTF-8 string, or - Noneof the locale is invalid or the tag does not exist.- Return type: - str- Gets the profile copyright. If the translated text is not available in the selected locale then the default untranslated (en_US) text is returned. - New in version 0.1.32. 
 - 
get_created()[source]¶
- Returns: - A - GLib.DateTimeobject, or- Nonefor not set- Return type: - GLib.DateTime- Gets the ICC creation date and time. - New in version 0.1.32. 
 - 
get_description(locale)[source]¶
- Parameters: - locale ( - str) – A locale, e.g. “en_GB.UTF-8” or- Nonefor the profile default- Raises: - GLib.Error- Returns: - The text as a UTF-8 string, or - Noneof the locale is invalid or the tag does not exist.- Return type: - str- Gets the profile description. If the translated text is not available in the selected locale then the default untranslated (en_US) text is returned. - New in version 0.1.32. 
 - 
get_filename()[source]¶
- Returns: - A filename, or - None- Return type: - str- Gets the filename of the ICC data, if one exists. - New in version 0.1.32. 
 - 
get_green()[source]¶
- Returns: - the - Colord.ColorXYZvalue- Return type: - Colord.ColorXYZ- Gets the profile green chromaticity value. This function will only return results if the profile was loaded with the - Colord.IccLoadFlags.PRIMARIESflag.- New in version 0.1.32. 
 - 
get_handle()[source]¶
- Returns: - Do not call cmsCloseProfile() on this value! - Return type: - objector- None- Return the cmsHPROFILE instance used locally. This may be required if you are using the profile in a transform. 
 - 
get_kind()[source]¶
- Returns: - The kind, e.g. %CD_PROFILE_KIND_INPUT - Return type: - Colord.ProfileKind- Gets the profile kind. - New in version 0.1.32. 
 - 
get_manufacturer(locale)[source]¶
- Parameters: - locale ( - str) – A locale, e.g. “en_GB.UTF-8” or- Nonefor the profile default- Raises: - GLib.Error- Returns: - The text as a UTF-8 string, or - Noneof the locale is invalid or the tag does not exist.- Return type: - str- Gets the profile manufacturer. If the translated text is not available in the selected locale then the default untranslated (en_US) text is returned. - New in version 0.1.32. 
 - 
get_metadata()[source]¶
- Returns: - The profile metadata - Return type: - { - object:- object}- Gets all the metadata from the ICC profile. - New in version 0.1.32. 
 - 
get_metadata_item(key)[source]¶
- Parameters: - key ( - str) – the dictionary key- Returns: - The dictionary data, or - Noneif the key does not exist.- Return type: - str- Gets an item of data from the ICC metadata store. - New in version 0.1.32. 
 - 
get_model(locale)[source]¶
- Parameters: - locale ( - str) – A locale, e.g. “en_GB.UTF-8” or- Nonefor the profile default- Raises: - GLib.Error- Returns: - The text as a UTF-8 string, or - Noneof the locale is invalid or the tag does not exist.- Return type: - str- Gets the profile model. If the translated text is not available in the selected locale then the default untranslated (en_US) text is returned. - New in version 0.1.32. 
 - 
get_named_colors()[source]¶
- Returns: - An array of color swatches - Return type: - [ - Colord.ColorSwatch]- Gets any named colors in the profile. This function will only return results if the profile was loaded with the - Colord.IccLoadFlags.NAMED_COLORSflag.- New in version 0.1.32. 
 - 
get_red()[source]¶
- Returns: - the - Colord.ColorXYZvalue- Return type: - Colord.ColorXYZ- Gets the profile red chromaticity value. This function will only return results if the profile was loaded with the - Colord.IccLoadFlags.PRIMARIESflag.- New in version 0.1.32. 
 - 
get_response(size)[source]¶
- Parameters: - size ( - int) – the size of the curve to generate- Raises: - GLib.Error- Returns: - response data, or - Nonefor error- Return type: - [ - Colord.ColorRGB]- Generates a response curve of a specified size. - New in version 0.1.34. 
 - 
get_size()[source]¶
- Returns: - The size in bytes, or 0 for unknown. - Return type: - int- Gets the ICC profile file size - New in version 0.1.32. 
 - 
get_tag_data(tag)[source]¶
- Parameters: - tag ( - str) – a 4 bytes tag description, e.g. “cprt” or “vcgt”- Raises: - GLib.Error- Returns: - the data for the tag - Return type: - GLib.Bytes- Returns the raw data for the specific tag. Most users do not need to do this. - New in version 1.1.6. 
 - Raises: - GLib.Error- Returns: - the tag tables as an array of strings - Return type: - [ - str]- Returns the internal tag table. Most users do not need to do this. - New in version 1.1.6. 
 - 
get_temperature()[source]¶
- Returns: - The color temperature in Kelvin, or 0 for error. - Return type: - int- Gets the ICC color temperature, rounded to the nearest 100K. This function will only return results if the profile was loaded with the - Colord.IccLoadFlags.PRIMARIESflag.- New in version 0.1.32. 
 - 
get_vcgt(size)[source]¶
- Parameters: - size ( - int) – the desired size of the table data- Raises: - GLib.Error- Returns: - VCGT data, or - Nonefor error- Return type: - [ - Colord.ColorRGB]- Gets the video card calibration data from the profile. - New in version 0.1.34. 
 - 
get_version()[source]¶
- Returns: - A floating point version number, or 0.0 for unknown - Return type: - float- Gets the ICC profile version, typically 2.1 or 4.2 - New in version 0.1.32. 
 - 
get_warnings()[source]¶
- Returns: - An array of warning values - Return type: - [ - Colord.ProfileWarning]- Returns any warnings with profiles - New in version 0.1.34. 
 - 
get_white()[source]¶
- Returns: - the - Colord.ColorXYZvalue- Return type: - Colord.ColorXYZ- Gets the profile white point. This function will only return results if the profile was loaded with the - Colord.IccLoadFlags.PRIMARIESflag.- New in version 0.1.32. 
 - 
load_data(data, flags)[source]¶
- Parameters: - data (bytes) – binary data
- flags (Colord.IccLoadFlags) – a set ofColord.IccLoadFlags
 - Raises: - Return type: - Loads an ICC profile from raw byte data. - New in version 0.1.32. 
- data (
 - 
load_fd(fd, flags)[source]¶
- Parameters: - fd (int) – a file descriptor
- flags (Colord.IccLoadFlags) – a set ofColord.IccLoadFlags
 - Raises: - Return type: - Loads an ICC profile from an open file descriptor. - New in version 0.1.32. 
- fd (
 - 
load_file(file, flags, cancellable)[source]¶
- Parameters: - file (Gio.File) – aGio.File
- flags (Colord.IccLoadFlags) – a set ofColord.IccLoadFlags
- cancellable (Gio.CancellableorNone) – AGio.CancellableorNone
 - Raises: - Return type: - Loads an ICC profile from a local or remote file. - New in version 0.1.32. 
- file (
 - 
load_handle(handle, flags)[source]¶
- Parameters: - handle (objectorNone) – a cmsHPROFILE instance
- flags (Colord.IccLoadFlags) – a set ofColord.IccLoadFlags
 - Raises: - Return type: - Set the internal cmsHPROFILE instance. This may be required if you create the profile using cmsCreateRGBProfileTHR() and then want to use the functionality in - Colord.Icc.- Do not call cmsCloseProfile() on handle in the caller, this will be done when the self object is finalized. Treat the profile like it’s been adopted by this module. - To handle the internal error callback, you should use the thread-safe creation function, e.g. cmsCreateNULLProfileTHR(). The context_id should be set as the value of - Colord.Icc.get_context() for this object.- Additionally, this function cannot be called more than once, and also can’t be called if - Colord.Icc.load_file() has previously been used on the self object.- New in version 0.1.33. 
- handle (
 - 
remove_metadata(key)[source]¶
- Parameters: - key ( - str) – the metadata key- Removes an item of metadata. - New in version 0.1.32. 
 - 
save_data(flags)[source]¶
- Parameters: - flags ( - Colord.IccSaveFlags) – a set of- Colord.IccSaveFlags- Raises: - GLib.Error- Return type: - GLib.Bytes- Saves an ICC profile to an allocated memory location. - Return vale: A - GLib.Bytesstructure, or- Nonefor error- New in version 1.0.2. 
 - 
save_default(flags, cancellable)[source]¶
- Parameters: - flags (Colord.IccSaveFlags) – a set ofColord.IccSaveFlags
- cancellable (Gio.CancellableorNone) – AGio.CancellableorNone
 - Raises: - Return type: - Saves an ICC profile to the default per-user location. - Return vale: - Truefor success.- New in version 1.1.1. 
- flags (
 - 
save_file(file, flags, cancellable)[source]¶
- Parameters: - file (Gio.File) – aGio.File
- flags (Colord.IccSaveFlags) – a set ofColord.IccSaveFlags
- cancellable (Gio.CancellableorNone) – AGio.CancellableorNone
 - Raises: - Return type: - Saves an ICC profile to a local or remote file. - Return vale: - Truefor success.- New in version 0.1.32. 
- file (
 - 
set_characterization_data(data)[source]¶
- Parameters: - data ( - str) – TI3 string data, or- None- Sets the characterization data used to build the profile. - New in version 1.1.1. 
 - 
set_colorspace(colorspace)[source]¶
- Parameters: - colorspace ( - Colord.Colorspace) – the profile colorspace, e.g.- Colord.Colorspace.RGB- Sets the colorspace kind. - New in version 0.1.32. 
 - 
set_copyright(locale, value)[source]¶
- Parameters: - Sets the profile _copyright for a specific locale. - New in version 0.1.32. 
 - 
set_copyright_items(values)[source]¶
- Parameters: - values ({ - object:- object}) – New translated values, with the key being the locale.- Sets the profile copyrights for specific locales. - New in version 0.1.32. 
 - 
set_created(creation_time)[source]¶
- Parameters: - creation_time ( - GLib.DateTime) –- Sets the ICC creation date and time. - New in version 1.4.2. 
 - 
set_description(locale, value)[source]¶
- Parameters: - Sets the profile description for a specific locale. - New in version 0.1.32. 
 - 
set_description_items(values)[source]¶
- Parameters: - values ({ - object:- object}) – New translated values, with the key being the locale.- Sets the profile descriptions for specific locales. - New in version 0.1.32. 
 - 
set_filename(filename)[source]¶
- Parameters: - filename ( - str) – a filename, or- None- Sets the filename, which may be required if the ICC profile has been loaded using - Colord.Icc.load_fd() from a disk cache.- New in version 1.1.1. 
 - 
set_kind(kind)[source]¶
- Parameters: - kind ( - Colord.ProfileKind) – the profile kind, e.g.- Colord.ProfileKind.DISPLAY_DEVICE- Sets the profile kind. - New in version 0.1.32. 
 - 
set_manufacturer(locale, value)[source]¶
- Parameters: - Sets the profile manufacturer for a specific locale. - New in version 0.1.32. 
 - 
set_manufacturer_items(values)[source]¶
- Parameters: - values ({ - object:- object}) – New translated values, with the key being the locale.- Sets the profile manufacturers for specific locales. - New in version 0.1.32. 
 - 
set_model(locale, value)[source]¶
- Parameters: - Sets the profile model for a specific locale. - New in version 0.1.32. 
 - 
set_model_items(values)[source]¶
- Parameters: - values ({ - object:- object}) – New translated values, with the key being the locale.- Sets the profile models for specific locales. - New in version 0.1.32. 
 - 
set_tag_data(tag, data)[source]¶
- Parameters: - tag (str) – a 4 bytes tag description, e.g. “cprt” or “vcgt”
- data (GLib.Bytes) – a variable sized data entry
 - Raises: - Return type: - Sets the raw data for the specific tag. Most users do not need to do this. - New in version 1.1.6. 
- tag (
 - 
set_vcgt(vcgt)[source]¶
- Parameters: - vcgt ([ - Colord.ColorRGB]) – video card calibration data- Raises: - GLib.Error- Return type: - bool- Sets the Video Card Gamma Table from the profile. - Return vale: - Truefor success.- New in version 0.1.34. 
 
- 
classmethod 
Property Details¶
- 
Colord.Icc.props.blue¶
- Name: - blue- Type: - Colord.ColorXYZ- Default Value: - None- Flags: - READABLE
- 
Colord.Icc.props.green¶
- Name: - green- Type: - Colord.ColorXYZ- Default Value: - None- Flags: - READABLE
- 
Colord.Icc.props.red¶
- Name: - red- Type: - Colord.ColorXYZ- Default Value: - None- Flags: - READABLE
- 
Colord.Icc.props.white¶
- Name: - white- Type: - Colord.ColorXYZ- Default Value: - None- Flags: - READABLE