<?xml version="1.0"?>
<page id="Gimp.ColorTransform.new"
      type="topic"
      style="constructor"
      xmlns="http://projectmallard.org/1.0/"
      xmlns:api="http://projectmallard.org/experimental/api/"
      xmlns:ui="http://projectmallard.org/1.0/ui/">
  <info>
    <link xref="Gimp.ColorTransform" group="constructor" type="guide"/>
    <api:function>
      <api:returns>
        <api:type>Gimp.ColorTransform</api:type>
      </api:returns>
      <api:name>gimp_color_transform_new</api:name>
      <api:arg>
        <api:type>Gimp.ColorProfile</api:type>
        <api:name>src_profile</api:name>
      </api:arg>
      <api:arg>
        <api:type>Babl.Object</api:type>
        <api:name>src_format</api:name>
      </api:arg>
      <api:arg>
        <api:type>Gimp.ColorProfile</api:type>
        <api:name>dest_profile</api:name>
      </api:arg>
      <api:arg>
        <api:type>Babl.Object</api:type>
        <api:name>dest_format</api:name>
      </api:arg>
      <api:arg>
        <api:type>Gimp.ColorRenderingIntent</api:type>
        <api:name>rendering_intent</api:name>
      </api:arg>
      <api:arg>
        <api:type>Gimp.ColorTransformFlags</api:type>
        <api:name>flags</api:name>
      </api:arg>
    </api:function>
  </info>
  <title>Gimp.ColorTransform.new</title>
  <synopsis><code mime="text/x-gjs">
function new(src_profile: <link xref="Gimp.ColorProfile">Gimp.ColorProfile</link>, src_format: <link href="../Babl-0.1/Babl.Object.html">Babl.Object</link>, dest_profile: <link xref="Gimp.ColorProfile">Gimp.ColorProfile</link>, dest_format: <link href="../Babl-0.1/Babl.Object.html">Babl.Object</link>, rendering_intent: <link xref="Gimp.ColorRenderingIntent">Gimp.ColorRenderingIntent</link>, flags: <link xref="Gimp.ColorTransformFlags">Gimp.ColorTransformFlags</link>): <link xref="Gimp.ColorTransform">Gimp.ColorTransform</link> {
    // Gjs wrapper for gimp_color_transform_new()
}
  </code></synopsis>
  <p>This function creates an color transform.</p>  <p>The color transform is determined exclusively by <code>src_profile</code> and
<code>dest_profile</code>. The color spaces of <code>src_format</code> and <code>dest_format</code> are
ignored, the formats are only used to decide between what pixel
encodings to transform.</p>  <p>Note: this function used to return <code>null</code> if
<link xref="Gimp.ColorTransform.can_gegl_copy"/> returned <code>true</code> for
<code>src_profile</code> and <code>dest_profile</code>. 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-<code>null</code> transform and the code takes care of doing only
exactly the requested color transform.</p>
  <p>Since 2.10</p>
<terms>
<item>
<title><code>src_profile</code></title>
  <p>the source <link xref="Gimp.ColorProfile"/></p>
</item>
<item>
<title><code>src_format</code></title>
  <p>the source #Babl format</p>
</item>
<item>
<title><code>dest_profile</code></title>
  <p>the destination <link xref="Gimp.ColorProfile"/></p>
</item>
<item>
<title><code>dest_format</code></title>
  <p>the destination #Babl format</p>
</item>
<item>
<title><code>rendering_intent</code></title>
  <p>the rendering intent</p>
</item>
<item>
<title><code>flags</code></title>
  <p>transform flags</p>
</item>
<item>
<title><code>Returns</code></title>
  <p>the <link xref="Gimp.ColorTransform"/>, or <code>null</code> if there was an error.</p>
</item>
</terms>

</page>
