Gimp.ColorTransform¶
- Subclasses:
None
Methods¶
- Inherited:
- Structs:
class |
|
class |
|
class |
|
|
|
|
Virtual Methods¶
- Inherited:
Properties¶
None
Signals¶
- Inherited:
Name |
Short Description |
---|---|
Fields¶
- Inherited:
Class Details¶
- class Gimp.ColorTransform(**kwargs)¶
- Bases:
- Abstract:
No
- Structure:
Definitions and Functions relating to LCMS.
- classmethod can_gegl_copy(src_profile, dest_profile)¶
- Parameters:
src_profile (
Gimp.ColorProfile
) – sourceGimp.ColorProfile
dest_profile (
Gimp.ColorProfile
) – destinationGimp.ColorProfile
- Returns:
True
if pixels can be correctly converted between src_profile and dest_profile by simply usingGegl.Buffer.copy
(),Babl.process
() or similar.- Return type:
This function checks if a
Gimp.ColorTransform
is needed at all.New in version 2.10.
- classmethod new(src_profile, src_format, dest_profile, dest_format, rendering_intent, flags)¶
- Parameters:
src_profile (
Gimp.ColorProfile
) – the sourceGimp.ColorProfile
src_format (
Babl.Object
) – the sourceBabl.Object
formatdest_profile (
Gimp.ColorProfile
) – the destinationGimp.ColorProfile
dest_format (
Babl.Object
) – the destinationBabl.Object
formatrendering_intent (
Gimp.ColorRenderingIntent
) – the rendering intentflags (
Gimp.ColorTransformFlags
) – transform flags
- Returns:
the
Gimp.ColorTransform
, orNone
if there was an error.- Return type:
This function creates an color transform.
The color transform is determined exclusively by src_profile and dest_profile. The color spaces of src_format and dest_format are ignored, the formats are only used to decide between what pixel encodings to transform.
Note: this function used to return
None
ifGimp.ColorTransform.can_gegl_copy
() returnedTrue
for src_profile and dest_profile. This is no longer the case because special care has to be taken not to perform multiple implicit color transforms caused by babl formats with color spaces. Now, it always returns a non-None
transform and the code takes care of doing only exactly the requested color transform.New in version 2.10.
- classmethod new_proofing(src_profile, src_format, dest_profile, dest_format, proof_profile, proof_intent, display_intent, flags)¶
- Parameters:
src_profile (
Gimp.ColorProfile
) – the sourceGimp.ColorProfile
src_format (
Babl.Object
) – the sourceBabl.Object
formatdest_profile (
Gimp.ColorProfile
) – the destinationGimp.ColorProfile
dest_format (
Babl.Object
) – the destinationBabl.Object
formatproof_profile (
Gimp.ColorProfile
) – the proofGimp.ColorProfile
proof_intent (
Gimp.ColorRenderingIntent
) – the proof intentdisplay_intent (
Gimp.ColorRenderingIntent
) – the display intentflags (
Gimp.ColorTransformFlags
) – transform flags
- Returns:
the
Gimp.ColorTransform
, orNone
if there was an error.- Return type:
This function creates a simulation / proofing color transform.
See
Gimp.ColorTransform.new
() about the color spaces to transform between.New in version 2.10.
- process_buffer(src_buffer, src_rect, dest_buffer, dest_rect)¶
- Parameters:
src_buffer (
Gegl.Buffer
) – sourceGegl.Buffer
src_rect (
Gegl.Rectangle
) – rectangle in src_bufferdest_buffer (
Gegl.Buffer
) – destinationGegl.Buffer
dest_rect (
Gegl.Rectangle
) – rectangle in dest_buffer
This function transforms buffer into another buffer.
See
Gimp.ColorTransform.new
(): only the pixel encoding of src_buffer's and dest_buffer's formats honored, their color spaces are ignored. The transform always takes place between the color spaces determined by self's color profiles.New in version 2.10.
- process_pixels(src_format, src_pixels, dest_format, dest_pixels, length)¶
- Parameters:
src_format (
Babl.Object
) –Babl.Object
format of src_pixelsdest_format (
Babl.Object
) –Babl.Object
format of dest_pixelsdest_pixels (
object
orNone
) – pointer to the destination pixelslength (
int
) – number of pixels to process
This function transforms a contiguous line of pixels.
See
Gimp.ColorTransform.new
(): only the pixel encoding of src_format and dest_format is honored, their color spaces are ignored. The transform always takes place between the color spaces determined by self's color profiles.New in version 2.10.
Signal Details¶
- Gimp.ColorTransform.signals.progress(color_transform, object)¶
- Signal Name:
progress
- Flags:
- Parameters:
color_transform (
Gimp.ColorTransform
) – The object which received the signalobject (
float
) –