GimpColorTransform

GimpColorTransform — Definitions and Functions relating to LCMS.

Functions

Signals

void progress Run First

Types and Values

Object Hierarchy

    GObject
    ╰── GimpColorTransform

Description

Definitions and Functions relating to LCMS.

Functions

gimp_color_transform_new ()

GimpColorTransform *
gimp_color_transform_new (GimpColorProfile *src_profile,
                          const Babl *src_format,
                          GimpColorProfile *dest_profile,
                          const Babl *dest_format,
                          GimpColorRenderingIntent rendering_intent,
                          GimpColorTransformFlags flags);

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 NULL if gimp_color_transform_can_gegl_copy() returned TRUE 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-NULL transform and the code takes care of doing only exactly the requested color transform.

Parameters

src_profile

the source GimpColorProfile

 

src_format

the source Babl format

 

dest_profile

the destination GimpColorProfile

 

dest_format

the destination Babl format

 

rendering_intent

the rendering intent

 

flags

transform flags

 

Returns

the GimpColorTransform, or NULL if there was an error.

[nullable]

Since: 2.10


gimp_color_transform_new_proofing ()

GimpColorTransform *
gimp_color_transform_new_proofing (GimpColorProfile *src_profile,
                                   const Babl *src_format,
                                   GimpColorProfile *dest_profile,
                                   const Babl *dest_format,
                                   GimpColorProfile *proof_profile,
                                   GimpColorRenderingIntent proof_intent,
                                   GimpColorRenderingIntent display_intent,
                                   GimpColorTransformFlags flags);

This function creates a simulation / proofing color transform.

See gimp_color_transform_new() about the color spaces to transform between.

Parameters

src_profile

the source GimpColorProfile

 

src_format

the source Babl format

 

dest_profile

the destination GimpColorProfile

 

dest_format

the destination Babl format

 

proof_profile

the proof GimpColorProfile

 

proof_intent

the proof intent

 

display_intent

the display intent

 

flags

transform flags

 

Returns

the GimpColorTransform, or NULL if there was an error.

[nullable]

Since: 2.10


gimp_color_transform_process_pixels ()

void
gimp_color_transform_process_pixels (GimpColorTransform *transform,
                                     const Babl *src_format,
                                     gconstpointer src_pixels,
                                     const Babl *dest_format,
                                     gpointer dest_pixels,
                                     gsize length);

This function transforms a contiguous line of pixels.

See gimp_color_transform_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 transform 's color profiles.

Parameters

transform

a GimpColorTransform

 

src_format

Babl format of src_pixels

 

src_pixels

pointer to the source pixels

 

dest_format

Babl format of dest_pixels

 

dest_pixels

pointer to the destination pixels

 

length

number of pixels to process

 

Since: 2.10


gimp_color_transform_process_buffer ()

void
gimp_color_transform_process_buffer (GimpColorTransform *transform,
                                     GeglBuffer *src_buffer,
                                     const GeglRectangle *src_rect,
                                     GeglBuffer *dest_buffer,
                                     const GeglRectangle *dest_rect);

This function transforms buffer into another buffer.

See gimp_color_transform_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 transform 's color profiles.

Parameters

transform

a GimpColorTransform

 

src_buffer

source GeglBuffer

 

src_rect

rectangle in src_buffer

 

dest_buffer

destination GeglBuffer

 

dest_rect

rectangle in dest_buffer

 

Since: 2.10


gimp_color_transform_can_gegl_copy ()

gboolean
gimp_color_transform_can_gegl_copy (GimpColorProfile *src_profile,
                                    GimpColorProfile *dest_profile);

This function checks if a GimpColorTransform is needed at all.

Parameters

src_profile

source GimpColorProfile

 

dest_profile

destination GimpColorProfile

 

Returns

TRUE if pixels can be correctly converted between src_profile and dest_profile by simply using gegl_buffer_copy(), babl_process() or similar.

Since: 2.10

Types and Values

enum GimpColorTransformFlags

Flags for modifying GimpColorTransform's behavior.

Members

GIMP_COLOR_TRANSFORM_FLAGS_NOOPTIMIZE

optimize for accuracy rather than for speed

 

GIMP_COLOR_TRANSFORM_FLAGS_GAMUT_CHECK

mark out of gamut colors in the transform result

 

GIMP_COLOR_TRANSFORM_FLAGS_BLACK_POINT_COMPENSATION

do black point compensation

 

GimpColorTransform

typedef struct _GimpColorTransform GimpColorTransform;

Simply a typedef to gpointer, but actually is a cmsHTRANSFORM. It's used in public GIMP APIs in order to avoid having to include LCMS headers.

Signal Details

The “progress” signal

void
user_function (GimpColorTransform *gimpcolortransform,
               double              arg1,
               gpointer            user_data)

Flags: Run First