[DOC-CVS] [doc-en] master: sigmoidalcontrastimage.xml Amend parameter names (#5751)

[email protected] (Mikhail Alferov via GitHub)
Newsgroups php.doc.cvs
Message-ID <[email protected]>
Author: Mikhail Alferov (mmalferov)
Committer: GitHub (web-flow)
Pusher: lacatoire
Date: 2026-08-26T12:13:41+02:00

Commit: https://github.com/php/doc-en/commit/d9fec5dc8a61c5bbee1d7f70a7bea50c2388e0fd
Raw diff: https://github.com/php/doc-en/commit/d9fec5dc8a61c5bbee1d7f70a7bea50c2388e0fd.diff

sigmoidalcontrastimage.xml Amend parameter names (#5751)

* sigmoidalcontrastimage.xml Amend parameter names

Integer values in the description are confusing, whereas numbers in the x.xx format seem to be perceived more easily, and the type remains consistent

* Update sigmoidalcontrastimage.xml

* Update sigmoidalcontrastimage.xml

* Update sigmoidalcontrastimage.xml

* Update sigmoidalcontrastimage.xml

* Update sigmoidalcontrastimage.xml

* Apply suggestions from code review

Co-authored-by: Kamil Tekiela <[email protected]>

* Apply suggestions from code review

Co-authored-by: Louis-Arnaud <[email protected]>

* Remove whitespaces

---------

Co-authored-by: Kamil Tekiela <[email protected]>
Co-authored-by: Louis-Arnaud <[email protected]>

Changed paths:
  M  reference/imagick/imagick/sigmoidalcontrastimage.xml


Diff:

diff --git a/reference/imagick/imagick/sigmoidalcontrastimage.xml b/reference/imagick/imagick/sigmoidalcontrastimage.xml
index c17490a45fc6..52c774b97817 100644
--- a/reference/imagick/imagick/sigmoidalcontrastimage.xml
+++ b/reference/imagick/imagick/sigmoidalcontrastimage.xml
@@ -15,19 +15,22 @@
    <methodparam><type>float</type><parameter>beta</parameter></methodparam>
    <methodparam choice="opt"><type>int</type><parameter>channel</parameter><initializer>Imagick::CHANNEL_DEFAULT</initializer></methodparam>
   </methodsynopsis>
-  <para>
+  <simpara>
    Adjusts the contrast of an image with a non-linear sigmoidal contrast
    algorithm. Increase the contrast of the image using a sigmoidal transfer
-   function without saturating highlights or shadows. Contrast indicates
-   how much to increase the contrast (0 is none; 3 is typical; 20 is
-   pushing it); mid-point indicates where midtones fall in the resultant
-   image (0 is white; 50 is middle-gray; 100 is black). Set sharpen to
-   &true; to increase the image contrast otherwise the contrast is reduced.
-  </para>
-  <para>
+   function without saturating highlights or shadows. <parameter>alpha</parameter> indicates
+   how much to increase the contrast: <literal>0.00</literal> is none; <literal>3.00</literal> is
+   typical; <literal>20.00</literal> is pushing it.
+   <parameter>beta</parameter> indicates where midtones fall in the resultant
+   image, as a fraction of the quantum range: <literal>0.0</literal> is white,
+   <literal>0.5</literal> is middle-gray, <literal>1.0</literal> is black
+   (multiply by <code>getQuantumRange()['quantumRangeLong']</code> to get the value to
+   pass).
+  </simpara>
+  <simpara>
    See also <link xlink:href="&url.imagemagick.usage.color_mods.sigmoidal;">ImageMagick
-   v6 Examples - Image Transformations — Sigmoidal Non-linearity Contrast</link>
-  </para>
+    Examples -- Color Modifications — Sigmoidal Non-linearity Contrast</link>.
+  </simpara>
  </refsect1>
 
  <refsect1 role="parameters">
@@ -37,33 +40,35 @@
     <varlistentry>
      <term><parameter>sharpen</parameter></term>
      <listitem>
-      <para>
-       If true increase the contrast, if false decrease the contrast.
-      </para>
+      <simpara>
+       If &true; increase the contrast, if &false; decrease the contrast.
+      </simpara>
      </listitem>
     </varlistentry>
     <varlistentry>
      <term><parameter>alpha</parameter></term>
      <listitem>
-      <para>
-       The amount of contrast to apply. 1 is very little, 5 is a significant amount, 20 is extreme.
-      </para>
+      <simpara>
+       The amount of contrast to apply. <literal>1.00</literal> is very little, <literal>5.00</literal>
+       is a significant amount, <literal>20.00</literal> is extreme.
+      </simpara>
      </listitem>
     </varlistentry>
     <varlistentry>
      <term><parameter>beta</parameter></term>
      <listitem>
       <simpara>
-       Where the midpoint of the gradient will be. This value should be in the range 0 to 1 - multiplied by the quantum value for ImageMagick.
+       Where the midpoint of the gradient will be. This value should be in the range <literal>0.00</literal>
+       to <literal>1.00</literal> - multiplied by the quantum value for ImageMagick.
       </simpara>
      </listitem>
     </varlistentry>
     <varlistentry>
      <term><parameter>channel</parameter></term>
      <listitem>
-      <para>
+      <simpara>
        Which color channels the contrast will be applied to.
-      </para>
+      </simpara>
      </listitem>
     </varlistentry>
    </variablelist>
@@ -83,34 +88,31 @@
    &imagick.imagick.throws;
   </para>
  </refsect1>
- 
+
  <refsect1 role="examples">
   &reftitle.examples;
-  <para>
-   <example>
-    <title>
-     Create a gradient image using <function>Imagick::sigmoidalContrastImage</function>
-     suitable for blending two images together smoothly, with the blending
-     defined by $contrast and $the midpoint
-    </title>
-    <programlisting role="php">
+  <example>
+   <title>
+    Create a gradient image using <function>Imagick::sigmoidalContrastImage</function>
+    suitable for blending two images together smoothly, with the blending
+    defined by <parameter>alpha</parameter> and <parameter>beta</parameter>
+   </title>
+   <programlisting role="php">
 <![CDATA[
 <?php
 
-function generateBlendImage($width, $height, $contrast = 10, $midpoint = 0.5) {
+function generateBlendImage($width, $height, $alpha = 10, $beta = 0.5)
+{
     $imagick = new Imagick();
     $imagick->newPseudoImage($width, $height, 'gradient:black-white');
     $quanta = $imagick->getQuantumRange();
-    $imagick->sigmoidalContrastImage(true, $contrast, $midpoint * $quanta["quantumRangeLong"]);
+    $imagick->sigmoidalContrastImage(true, $alpha, $beta * $quanta["quantumRangeLong"]);
 
-    return $imagick; 
+    return $imagick;
 }
-
-?>
 ]]>
-    </programlisting>
-   </example>
-  </para>
+   </programlisting>
+  </example>
  </refsect1>
 
 </refentry>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.