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.ColorProfiledest_profile (
Gimp.ColorProfile) – destinationGimp.ColorProfile
- Returns:
Trueif 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.ColorTransformis 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.ColorProfilesrc_format (
Babl.Object) – the sourceBabl.Objectformatdest_profile (
Gimp.ColorProfile) – the destinationGimp.ColorProfiledest_format (
Babl.Object) – the destinationBabl.Objectformatrendering_intent (
Gimp.ColorRenderingIntent) – the rendering intentflags (
Gimp.ColorTransformFlags) – transform flags
- Returns:
the
Gimp.ColorTransform, orNoneif 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
NoneifGimp.ColorTransform.can_gegl_copy() returnedTruefor 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-Nonetransform 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.ColorProfilesrc_format (
Babl.Object) – the sourceBabl.Objectformatdest_profile (
Gimp.ColorProfile) – the destinationGimp.ColorProfiledest_format (
Babl.Object) – the destinationBabl.Objectformatproof_profile (
Gimp.ColorProfile) – the proofGimp.ColorProfileproof_intent (
Gimp.ColorRenderingIntent) – the proof intentdisplay_intent (
Gimp.ColorRenderingIntent) – the display intentflags (
Gimp.ColorTransformFlags) – transform flags
- Returns:
the
Gimp.ColorTransform, orNoneif 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.Buffersrc_rect (
Gegl.Rectangle) – rectangle in src_bufferdest_buffer (
Gegl.Buffer) – destinationGegl.Bufferdest_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.Objectformat of src_pixelsdest_format (
Babl.Object) –Babl.Objectformat of dest_pixelsdest_pixels (
objectorNone) – 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) –