Colord.Icc¶
- Subclasses:
None
Methods¶
- Inherited:
- Structs:
Virtual Methods¶
- Inherited:
Properties¶
Name |
Type |
Flags |
Short Description |
|---|---|---|---|
r |
|||
r |
|||
r |
|||
r/w |
|||
r |
|||
r |
|||
r/w |
|||
r |
|||
r |
|||
r |
|||
r/w |
|||
r |
Signals¶
- Inherited:
Fields¶
- Inherited:
Name |
Type |
Access |
Description |
|---|---|---|---|
parent_instance |
r |
Class Details¶
- class Colord.Icc(**kwargs)¶
- Bases:
- Abstract:
No
- Structure:
- classmethod new()[source]¶
- Returns:
a new
Colord.Iccobject.- Return type:
Creates a new
Colord.Iccobject.New in version 0.1.32.
- add_metadata(key, value)[source]¶
-
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:
- Returns:
Truefor success- Return type:
Creates a default sRGB ICC profile.
New in version 1.1.2.
- create_default_full(flags)[source]¶
- Parameters:
flags (
Colord.IccLoadFlags) – a set ofColord.IccLoadFlags- Raises:
- Returns:
Truefor success- Return type:
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 gammared (
Colord.ColorYxy) – primary color valuegreen (
Colord.ColorYxy) – primary color valueblue (
Colord.ColorYxy) – primary color valuewhite (
Colord.ColorYxy) – whitepoint value
- Raises:
- Returns:
Truefor success- Return type:
Creates an ICC profile from EDID data.
New in version 0.1.32.
- create_from_edid_data(edid)[source]¶
- Parameters:
edid (
Colord.Edid) – EDID data- Raises:
- Returns:
Truefor success- Return type:
Creates an ICC profile from EDID data.
New in version 1.1.2.
- get_blue()[source]¶
- Returns:
the
Colord.ColorXYZvalue- Return type:
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:
TrueifGio.File.delete() would likely work- Return type:
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:
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]¶
-
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 usingColord.Icc.load_data() orColord.Icc.load_file() and theColord.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:
Gets the profile colorspace
New in version 0.1.32.
- get_context()[source]¶
-
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” orNonefor the profile default- Raises:
- Returns:
The text as a UTF-8 string, or
Noneof the locale is invalid or the tag does not exist.- Return type:
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, orNonefor not set- Return type:
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” orNonefor the profile default- Raises:
- Returns:
The text as a UTF-8 string, or
Noneof the locale is invalid or the tag does not exist.- Return type:
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_green()[source]¶
- Returns:
the
Colord.ColorXYZvalue- Return type:
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]¶
-
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:
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” orNonefor the profile default- Raises:
- Returns:
The text as a UTF-8 string, or
Noneof the locale is invalid or the tag does not exist.- Return type:
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_item(key)[source]¶
- Parameters:
key (
str) – the dictionary key- Returns:
The dictionary data, or
Noneif the key does not exist.- Return type:
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” orNonefor the profile default- Raises:
- Returns:
The text as a UTF-8 string, or
Noneof the locale is invalid or the tag does not exist.- Return type:
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:
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:
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:
- Returns:
response data, or
Nonefor error- Return type:
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:
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:
- Returns:
the data for the tag
- Return type:
Returns the raw data for the specific tag. Most users do not need to do this.
New in version 1.1.6.
- get_tags()[source]¶
- Raises:
- 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:
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:
- Returns:
VCGT data, or
Nonefor error- Return type:
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:
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:
Returns any warnings with profiles
New in version 0.1.34.
- get_white()[source]¶
- Returns:
the
Colord.ColorXYZvalue- Return type:
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 dataflags (
Colord.IccLoadFlags) – a set ofColord.IccLoadFlags
- Raises:
- Return type:
Loads an ICC profile from raw byte data.
New in version 0.1.32.
- load_fd(fd, flags)[source]¶
- Parameters:
fd (
int) – a file descriptorflags (
Colord.IccLoadFlags) – a set ofColord.IccLoadFlags
- Raises:
- Return type:
Loads an ICC profile from an open file descriptor.
New in version 0.1.32.
- load_file(file, flags, cancellable)[source]¶
- Parameters:
flags (
Colord.IccLoadFlags) – a set ofColord.IccLoadFlagscancellable (
Gio.CancellableorNone) – AGio.CancellableorNone
- Raises:
- Return type:
Loads an ICC profile from a local or remote file.
New in version 0.1.32.
- load_handle(handle, flags)[source]¶
- Parameters:
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.
- 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 ofColord.IccSaveFlags- Raises:
- Return type:
Saves an ICC profile to an allocated memory location.
Return vale: A
GLib.Bytesstructure, orNonefor errorNew in version 1.0.2.
- save_default(flags, cancellable)[source]¶
- Parameters:
flags (
Colord.IccSaveFlags) – a set ofColord.IccSaveFlagscancellable (
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.
- save_file(file, flags, cancellable)[source]¶
- Parameters:
flags (
Colord.IccSaveFlags) – a set ofColord.IccSaveFlagscancellable (
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.
- set_characterization_data(data)[source]¶
-
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]¶
-
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]¶
-
Sets the profile descriptions for specific locales.
New in version 0.1.32.
- set_filename(filename)[source]¶
-
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]¶
-
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]¶
-
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.
- set_vcgt(vcgt)[source]¶
- Parameters:
vcgt ([
Colord.ColorRGB]) – video card calibration data- Raises:
- Return type:
Sets the Video Card Gamma Table from the profile.
Return vale:
Truefor success.New in version 0.1.34.
Property Details¶
- Colord.Icc.props.blue¶
- Name:
blue- Type:
- Default Value:
- Flags:
- Colord.Icc.props.green¶
- Name:
green- Type:
- Default Value:
- Flags:
- Colord.Icc.props.red¶
- Name:
red- Type:
- Default Value:
- Flags:
- Colord.Icc.props.white¶
- Name:
white- Type:
- Default Value:
- Flags: