Gimp.ColorTransform.new
Description: Reference for Gimp.ColorTransform.new

### Constructor

# Gimp ColorTransformnew

since: 2.10

#### Declaration [src]

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

#### Description [src]

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.

Available since: 2.10

#### Parameters

`src_profile`

  Type: `GimpColorProfile`

  The source `GimpColorProfile`.

  The data is owned by the caller of the function.

`src_format`

  Type: `Babl`

  The source `Babl` format.

  The data is owned by the caller of the function.

`dest_profile`

  Type: `GimpColorProfile`

  The destination `GimpColorProfile`.

  The data is owned by the caller of the function.

`dest_format`

  Type: `Babl`

  The destination `Babl` format.

  The data is owned by the caller of the function.

`rendering_intent`

  Type: `GimpColorRenderingIntent`

  The rendering intent.

`flags`

  Type: `GimpColorTransformFlags`

  Transform flags.

#### Return value

Type: `GimpColorTransform`

The `GimpColorTransform`, or `NULL` if there was an error.

The caller of the function takes ownership of the data, and is responsible for freeing it.
The return value can be `NULL`.