Gimp.ColorTransform.new

function new(src_profile: Gimp.ColorProfile, src_format: Babl.Object, dest_profile: Gimp.ColorProfile, dest_format: Babl.Object, rendering_intent: Gimp.ColorRenderingIntent, flags: Gimp.ColorTransformFlags): Gimp.ColorTransform {
    // Gjs wrapper for gimp_color_transform_new()
}
  

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.ColorTransform.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.

Since 2.10

src_profile

the source Gimp.ColorProfile

src_format

the source #Babl format

dest_profile

the destination Gimp.ColorProfile

dest_format

the destination #Babl format

rendering_intent

the rendering intent

flags

transform flags

Returns

the Gimp.ColorTransform, or null if there was an error.