Skip to content

sigmoidalcontrastimage.xml Amend parameter names - #5751

Open
mmalferov wants to merge 7 commits into
php:masterfrom
mmalferov:patch-20
Open

sigmoidalcontrastimage.xml Amend parameter names#5751
mmalferov wants to merge 7 commits into
php:masterfrom
mmalferov:patch-20

Conversation

@mmalferov

Copy link
Copy Markdown
Member

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

Comment on lines +60 to +61
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.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is still super confusing to me, but I have no idea how to write it better.

Comment on lines +25 to +26
image: <literal>0.00</literal> is white; <literal>0.50</literal> is
middle-gray; <literal>1.00</literal> is black. Set <parameter>sharpen</parameter> to

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think dividing by 100 is correct here. I don't know anything about Imagick, so I think keeping it 0, 50, 100 is safer.

Comment thread reference/imagick/imagick/sigmoidalcontrastimage.xml Outdated
@kamil-tekiela

kamil-tekiela commented Aug 10, 2026

Copy link
Copy Markdown
Member

This page was based on https://phpimagick.com/Imagick/sigmoidalContrastImage?midpoint=0&sigmoidal_contrast=0.5&sharpening=Increase&image_path=Lorikeet so I think we should try to keep it the same as they document it in the official docs.

It looks like we have the contrast and midpoint reversed.

@kamil-tekiela

Copy link
Copy Markdown
Member

Honestly, I think this user note is way better at explaining it than our whole manual page: https://www.php.net/manual/en/imagick.sigmoidalcontrastimage.php#113920

The whole page needs to be rewritten.

Co-authored-by: Kamil Tekiela <tekiela246@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants