From 93f6844c27c6b0c17cdfd79f5884d7e980f62f49 Mon Sep 17 00:00:00 2001 From: Mikhail Alferov Date: Sun, 9 Aug 2026 23:24:33 +0300 Subject: [PATCH 1/7] 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 --- .../imagick/sigmoidalcontrastimage.xml | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/reference/imagick/imagick/sigmoidalcontrastimage.xml b/reference/imagick/imagick/sigmoidalcontrastimage.xml index c17490a45fc6..642adf494843 100644 --- a/reference/imagick/imagick/sigmoidalcontrastimage.xml +++ b/reference/imagick/imagick/sigmoidalcontrastimage.xml @@ -18,10 +18,10 @@ 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 + function without saturating highlights or shadows. alpha indicates + how much to increase the contrast: 0.00 is none; 3.00 is typical; 20.00 is pushing it. + beta indicates where midtones fall in the resultant + image: 0.00 is white; 0.50 is middle-gray; 1.00 is black. Set sharpen to &true; to increase the image contrast otherwise the contrast is reduced. @@ -46,7 +46,7 @@ alpha - The amount of contrast to apply. 1 is very little, 5 is a significant amount, 20 is extreme. + The amount of contrast to apply. 1.00 is very little, 5.00 is a significant amount, 20.00 is extreme. @@ -91,22 +91,21 @@ 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 + defined by $alpha and $beta 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; } - -?> ]]> From 55703aeb3ea6f8853d607dcb80229e7eb06e576e Mon Sep 17 00:00:00 2001 From: Mikhail Alferov Date: Sun, 9 Aug 2026 23:34:01 +0300 Subject: [PATCH 2/7] Update sigmoidalcontrastimage.xml --- reference/imagick/imagick/sigmoidalcontrastimage.xml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/reference/imagick/imagick/sigmoidalcontrastimage.xml b/reference/imagick/imagick/sigmoidalcontrastimage.xml index 642adf494843..fedebf898627 100644 --- a/reference/imagick/imagick/sigmoidalcontrastimage.xml +++ b/reference/imagick/imagick/sigmoidalcontrastimage.xml @@ -15,7 +15,7 @@ floatbeta intchannelImagick::CHANNEL_DEFAULT - + 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. alpha indicates @@ -23,7 +23,7 @@ beta indicates where midtones fall in the resultant image: 0.00 is white; 0.50 is middle-gray; 1.00 is black. Set sharpen to &true; to increase the image contrast otherwise the contrast is reduced. - + See also ImageMagick v6 Examples - Image Transformations — Sigmoidal Non-linearity Contrast @@ -45,9 +45,9 @@ alpha - + The amount of contrast to apply. 1.00 is very little, 5.00 is a significant amount, 20.00 is extreme. - + From bd1472f9b5202598767c176af2eb35275996c4bb Mon Sep 17 00:00:00 2001 From: Mikhail Alferov Date: Sun, 9 Aug 2026 23:42:05 +0300 Subject: [PATCH 3/7] Update sigmoidalcontrastimage.xml --- reference/imagick/imagick/sigmoidalcontrastimage.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/reference/imagick/imagick/sigmoidalcontrastimage.xml b/reference/imagick/imagick/sigmoidalcontrastimage.xml index fedebf898627..340ca23e84c5 100644 --- a/reference/imagick/imagick/sigmoidalcontrastimage.xml +++ b/reference/imagick/imagick/sigmoidalcontrastimage.xml @@ -26,7 +26,7 @@ See also ImageMagick - v6 Examples - Image Transformations — Sigmoidal Non-linearity Contrast + Examples -- Color Modifications — Sigmoidal Non-linearity Contrast From 343ad672ca04791f3ff41deba7f7da35c6d115cf Mon Sep 17 00:00:00 2001 From: Mikhail Alferov Date: Mon, 10 Aug 2026 00:24:40 +0300 Subject: [PATCH 4/7] Update sigmoidalcontrastimage.xml --- reference/imagick/imagick/sigmoidalcontrastimage.xml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/reference/imagick/imagick/sigmoidalcontrastimage.xml b/reference/imagick/imagick/sigmoidalcontrastimage.xml index 340ca23e84c5..6cd4f9175e96 100644 --- a/reference/imagick/imagick/sigmoidalcontrastimage.xml +++ b/reference/imagick/imagick/sigmoidalcontrastimage.xml @@ -38,7 +38,7 @@ sharpen - If true increase the contrast, if false decrease the contrast. + If &true; increase the contrast, if &false; decrease the contrast. @@ -54,7 +54,8 @@ beta - 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 0.00 + to 1.00 - multiplied by the quantum value for ImageMagick. From 7f498e7d044456eff67026efc101f3254df4d98e Mon Sep 17 00:00:00 2001 From: Mikhail Alferov Date: Mon, 10 Aug 2026 00:50:39 +0300 Subject: [PATCH 5/7] Update sigmoidalcontrastimage.xml --- .../imagick/imagick/sigmoidalcontrastimage.xml | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/reference/imagick/imagick/sigmoidalcontrastimage.xml b/reference/imagick/imagick/sigmoidalcontrastimage.xml index 6cd4f9175e96..58b152e73d10 100644 --- a/reference/imagick/imagick/sigmoidalcontrastimage.xml +++ b/reference/imagick/imagick/sigmoidalcontrastimage.xml @@ -19,15 +19,17 @@ 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. alpha indicates - how much to increase the contrast: 0.00 is none; 3.00 is typical; 20.00 is pushing it. + how much to increase the contrast: 0.00 is none; 3.00 is + typical; 20.00 is pushing it. beta indicates where midtones fall in the resultant - image: 0.00 is white; 0.50 is middle-gray; 1.00 is black. Set sharpen to + image: 0.00 is white; 0.50 is + middle-gray; 1.00 is black. Set sharpen to &true; to increase the image contrast otherwise the contrast is reduced. - + See also ImageMagick - Examples -- Color Modifications — Sigmoidal Non-linearity Contrast - + Examples -- Color Modifications — Sigmoidal Non-linearity Contrast. + @@ -46,7 +48,8 @@ alpha - The amount of contrast to apply. 1.00 is very little, 5.00 is a significant amount, 20.00 is extreme. + The amount of contrast to apply. 1.00 is very little, 5.00 + is a significant amount, 20.00 is extreme. From 3c953e260990390d03f85904249eee2dd3c783ec Mon Sep 17 00:00:00 2001 From: Mikhail Alferov Date: Mon, 10 Aug 2026 01:04:48 +0300 Subject: [PATCH 6/7] Update sigmoidalcontrastimage.xml --- .../imagick/sigmoidalcontrastimage.xml | 28 +++++++++---------- 1 file changed, 13 insertions(+), 15 deletions(-) diff --git a/reference/imagick/imagick/sigmoidalcontrastimage.xml b/reference/imagick/imagick/sigmoidalcontrastimage.xml index 58b152e73d10..8e738b1aa349 100644 --- a/reference/imagick/imagick/sigmoidalcontrastimage.xml +++ b/reference/imagick/imagick/sigmoidalcontrastimage.xml @@ -39,9 +39,9 @@ sharpen - + If &true; increase the contrast, if &false; decrease the contrast. - + @@ -65,9 +65,9 @@ channel - + Which color channels the contrast will be applied to. - + @@ -90,14 +90,13 @@ &reftitle.examples; - - - - Create a gradient image using <function>Imagick::sigmoidalContrastImage</function> - suitable for blending two images together smoothly, with the blending - defined by $alpha and $beta - - + + + Create a gradient image using <function>Imagick::sigmoidalContrastImage</function> + suitable for blending two images together smoothly, with the blending + defined by $alpha and $beta + + - - - + + From 9acf08ec3cbd1a483528ef5159fdc8f33c806d9a Mon Sep 17 00:00:00 2001 From: Mikhail Alferov Date: Tue, 11 Aug 2026 02:03:01 +0300 Subject: [PATCH 7/7] Apply suggestions from code review Co-authored-by: Kamil Tekiela --- reference/imagick/imagick/sigmoidalcontrastimage.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/reference/imagick/imagick/sigmoidalcontrastimage.xml b/reference/imagick/imagick/sigmoidalcontrastimage.xml index 8e738b1aa349..8f094f64570f 100644 --- a/reference/imagick/imagick/sigmoidalcontrastimage.xml +++ b/reference/imagick/imagick/sigmoidalcontrastimage.xml @@ -94,7 +94,7 @@ Create a gradient image using <function>Imagick::sigmoidalContrastImage</function> suitable for blending two images together smoothly, with the blending - defined by $alpha and $beta + defined by <parameter>alpha</parameter> and <parameter>beta</parameter>