Posted: 2006-07-17T17:52:01-07:00
Until we get a patch in the current ImageMagick release, use
- image->SigmoidalContrast( "3x50" );
Use https://github.com/ImageMagick/ImageMagick/discussions instead.
https://magick.imagemagick.org/
it seems that currently neither this method, nor the parameters described in the PerlMagic documentation work as they should. At least for me, the following bit of codeUntil we get a patch in the current ImageMagick release, use
image->SigmoidalContrast( "3x50" );
Code: Select all
my $img = Image::Magick->new();
$img->Set(size => '160x120');
$img->Read('gradient:#ffffff-#000000');
push(@$img, $img->[0]->Clone());
$img->[1]->SigmoidalContrast(contrast => 3, 'mid-point' => 10);
push(@$img, $img->[0]->Clone());
$img->[2]->SigmoidalContrast(contrast => 3, 'mid-point' => 90);
push(@$img, $img->[0]->Clone());
$img->[3]->SigmoidalContrast(contrast => 3, 'mid-point' => 0.1);
push(@$img, $img->[0]->Clone());
$img->[4]->SigmoidalContrast(contrast => 3, 'mid-point' => 0.9);
push(@$img, $img->[0]->Clone());
$img->[5]->SigmoidalContrast('3x10');
push(@$img, $img->[0]->Clone());
$img->[6]->SigmoidalContrast('3x90');
$img->Montage()->Write('sigmoidalContrast.png');
That works, thanks a lot!magick wrote:Use '3x50%' or use an absolute value that scales to the quantum-depth of your ImageMagick distribution. Most likely its Q16 so use 59000 instead of 90.