<?php
bool public Imagick::adaptiveThresholdImage(
int $width,
int $height,
int $offset
);
?>
<?php
// Run several times
$img1 = new Imagick();
$jpgfn = PATH2IMGW . '/png/E 01 01.png';
$str1img = 'img/results/E 01 01531.png';
$img1->readImage($jpgfn);
$width = mt_rand(0,10);
$height = mt_rand(0,100);
$offset = mt_rand(0, 125) / 100;
echo "adaptiveThresholdImage( $width, $height, $offset )<br>";
$img1->adaptiveThresholdImage($width,$height,$offset);
$strg = $img1->getImageBlob();
$img = imagecreatefromstring($strg);
imagepng($img, $str1img);
echo '<br>' . basename($str1img); ?>
<br><br>
<img src="<?php echo $str1img; ?>"
alt="<?php echo $str1img; ?>"
title="<?php echo $str1img; ?>">