Gimp.ColorProfile¶
- Subclasses:
None
Methods¶
- Inherited:
- Structs:
class |
|
class |
|
class |
|
class |
|
class |
|
class |
|
class |
|
class |
|
class |
|
class |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Virtual Methods¶
- Inherited:
Properties¶
None
Signals¶
- Inherited:
Fields¶
- Inherited:
Class Details¶
- class Gimp.ColorProfile(**kwargs)¶
- Bases:
- Abstract:
No
- Structure:
Definitions and Functions relating to LCMS.
- classmethod get_lcms_format(format)¶
- Parameters:
format (
Babl.Object
) – aBabl.Object
format- Returns:
the
Babl.Object
format to be used instead of format, orNone
if the passed format is not supported at all.- lcms_format:
return location for an lcms format
- Return type:
(
Babl.Object
orNone
, lcms_format:int
)
This function takes a
Babl.Object
format and returns the lcms format to be used with that format. It also returns aBabl.Object
format to be used instead of the passed format, which usually is the same as format, unless lcms doesn’t support format.Note that this function currently only supports RGB, RGBA, R’G’B’, R’G’B’A, Y, YA, Y’, Y’A and the cairo-RGB24 and cairo-ARGB32 formats.
New in version 2.10.
- classmethod new_d50_gray_lab_trc()¶
- Returns:
a gray profile with the D50 ICC profile illuminant as the profile white point and the LAB companding curve as the TRC. as the TRC.
- Return type:
This function creates a grayscale
Gimp.ColorProfile
with the D50 ICC profile illuminant as the profile white point and the LAB companding curve as the TRC.New in version 2.10.
- classmethod new_d65_gray_linear()¶
- Return type:
- classmethod new_d65_gray_srgb_trc()¶
- Returns:
the sRGB-gamma grayscale
Gimp.ColorProfile
.- Return type:
This function creates a grayscale
Gimp.ColorProfile
with an sRGB TRC. SeeGimp.ColorProfile.new_rgb_srgb
().New in version 2.10.
- classmethod new_from_file(file)¶
- Parameters:
- Raises:
- Returns:
the
Gimp.ColorProfile
, orNone
. On error,None
is returned and error is set.- Return type:
This function opens an ICC color profile from file.
New in version 2.10.
- classmethod new_from_icc_profile(data)¶
- Parameters:
data (
bytes
) – The memory containing an ICC profile- Raises:
- Returns:
the
Gimp.ColorProfile
, orNone
.- Return type:
This function opens an ICC color profile from memory. On error,
None
is returned and error is set.New in version 2.10.
- classmethod new_from_lcms_profile(lcms_profile)¶
- Parameters:
- Raises:
- Returns:
the
Gimp.ColorProfile
, orNone
.- Return type:
This function creates a
Gimp.ColorProfile
from a cmsHPROFILE. On error,None
is returned and error is set. The passed lcms_profile pointer is not retained by the createdGimp.ColorProfile
.New in version 2.10.
- classmethod new_rgb_adobe()¶
- Returns:
the AdobeRGB-compatible
Gimp.ColorProfile
.- Return type:
This function creates a profile compatible with AbobeRGB (1998).
New in version 2.10.
- classmethod new_rgb_srgb()¶
- Returns:
the sRGB
Gimp.ColorProfile
.- Return type:
This function is a replacement for cmsCreate_sRGBProfile() and returns an sRGB profile that is functionally the same as the ArgyllCMS sRGB.icm profile. “Functionally the same” means it has the same red, green, and blue colorants and the V4 “chad” equivalent of the ArgyllCMS V2 white point. The profile TRC is also functionally equivalent to the ArgyllCMS sRGB.icm TRC and is the same as the LCMS sRGB built-in profile TRC.
The actual primaries in the sRGB specification are red xy: {0.6400, 0.3300, 1.0} green xy: {0.3000, 0.6000, 1.0} blue xy: {0.1500, 0.0600, 1.0}
The sRGB primaries given below are “pre-quantized” to compensate for hexadecimal quantization during the profile-making process. Unless the profile-making code compensates for this quantization, the resulting profile’s red, green, and blue colorants will deviate slightly from the correct XYZ values.
LCMS2 doesn’t compensate for hexadecimal quantization. The “pre-quantized” primaries below were back-calculated from the ArgyllCMS sRGB.icm profile. The resulting sRGB profile’s colorants exactly matches the ArgyllCMS sRGB.icm profile colorants.
New in version 2.10.
- classmethod new_rgb_srgb_linear()¶
- Returns:
the linear RGB
Gimp.ColorProfile
.- Return type:
This function creates a profile for
Babl.model
(“RGB”). Please somebody write something smarter here.New in version 2.10.
- get_copyright()¶
- Returns:
a string containing self's copyright. The returned value belongs to self and must not be modified or freed.
- Return type:
New in version 2.10.
- get_description()¶
- Returns:
a string containing self's description. The returned value belongs to self and must not be modified or freed.
- Return type:
New in version 2.10.
- get_format(format, intent)¶
- Parameters:
format (
Babl.Object
) – aBabl.Object
formatintent (
Gimp.ColorRenderingIntent
) – aGimp.ColorRenderingIntent
- Raises:
- Returns:
the new
Babl.Object
format.- Return type:
This function takes a
Gimp.ColorProfile
and aBabl.Object
format and returns a newBabl.Object
format with self's RGB primaries and TRC, and format's pixel layout.New in version 2.10.
- get_icc_profile()¶
- Returns:
a pointer to the IIC profile data.
- Return type:
This function returns self as ICC profile data. The returned memory belongs to self and must not be modified or freed.
New in version 2.10.
- get_label()¶
- Returns:
the self's label. The returned value belongs to self and must not be modified or freed.
- Return type:
This function returns a string containing self's “title”, a string that can be used to label the profile in a user interface.
Unlike
Gimp.ColorProfile.get_description
(), this function always returns a string (as a fallback, it returns “(unnamed profile)”).New in version 2.10.
- get_lcms_profile()¶
-
This function returns self's cmsHPROFILE. The returned value belongs to self and must not be modified or freed.
New in version 2.10.
- get_manufacturer()¶
- Returns:
a string containing self's manufacturer. The returned value belongs to self and must not be modified or freed.
- Return type:
New in version 2.10.
- get_model()¶
- Returns:
a string containing self's model. The returned value belongs to self and must not be modified or freed.
- Return type:
New in version 2.10.
- get_space(intent)¶
- Parameters:
intent (
Gimp.ColorRenderingIntent
) – aGimp.ColorRenderingIntent
- Raises:
- Returns:
the new
Babl.Object
space.- Return type:
This function returns the
Babl.Object
space of self, for the specified intent.New in version 2.10.6.
- get_summary()¶
- Returns:
the self's summary. The returned value belongs to self and must not be modified or freed.
- Return type:
This function return a string containing a multi-line summary of self's description, model, manufacturer and copyright, to be used as detailed information about the profile in a user interface.
New in version 2.10.
- is_cmyk()¶
-
New in version 2.10.
- is_equal(profile2)¶
- Parameters:
profile2 (
Gimp.ColorProfile
) – aGimp.ColorProfile
- Returns:
- Return type:
Compares two profiles.
New in version 2.10.
- is_gray()¶
-
New in version 2.10.
- is_linear()¶
- Returns:
True
if the profile is a matrix shaping profile with linear TRCs,False
otherwise.- Return type:
This function determines is the ICC profile represented by a
Gimp.ColorProfile
is a linear RGB profile or not, some profiles that are LUTs though linear will also returnFalse
;New in version 2.10.
- is_rgb()¶
-
New in version 2.10.
- new_linear_from_color_profile()¶
- Returns:
the new
Gimp.ColorProfile
, orNone
if self is not an RGB profile or not matrix-based.- Return type:
This function creates a new RGB
Gimp.ColorProfile
with a linear TRC and self's RGB chromacities and whitepoint.New in version 2.10.
- new_srgb_trc_from_color_profile()¶
- Returns:
the new
Gimp.ColorProfile
, orNone
if self is not an RGB profile or not matrix-based.- Return type:
This function creates a new RGB
Gimp.ColorProfile
with a sRGB gamma TRC and self's RGB chromacities and whitepoint.New in version 2.10.