<?php
bool public Imagick::thumbnailImage(
int $columns,
int $rows,
bool $bestfit = false,
bool $fill = false,
bool $legacy = false
);
?>
<?php
$img1 = new imagick(PATH2IMGW . '/jpg/aa.jpg');
$str1img = 'img/results/aath491.jpg';
$img1->thumbnailImage(100, 100, true, true);
$str1 = $img1->getImageBlob();
$img = imagecreatefromstring($str1);
imagejpeg($img, $str1img);
echo basename($str1img); ?>
<br><br>
<img src="<?php echo $str1img; ?>"
alt="<?php echo $str1img; ?>"
title="<?php echo $str1img; ?>">
<?php
$img2 = new imagick(PATH2IMGW . '/png/wizard.png');
$str2img = 'img/results/wizard492.png';
$img2->thumbnailImage(100, 100, true, true);
$str2 = $img2->getImageBlob();
$img = imagecreatefromstring($str2);
imagepng($img, $str2img);
echo basename($str2img); ?>
<br><br>
<img src="<?php echo $str2img; ?>"
alt="<?php echo $str2img; ?>"
title="<?php echo $str2img; ?>">
<?php
$img3 = new imagick(PATH2IMGW . '/gif/E 01 01.gif');
$str3img = 'img/gif/E 01 01t493.gif';
// Run this exercise several times
$c1 = mt_rand(0, 255);
$c2 = mt_rand(0, 255);
$c3 = mt_rand(0, 255);
echo "rgb($c1, $c2, $c3)<br><br>";
$img3->setImageBackgroundColor("rgb($c1, $c2, $c3)");
$img3->thumbnailImage(300, 300, false);
$str3 = $img3->getImageBlob();
$img = imagecreatefromstring($str3);
imagegif($img, $str3img);
echo basename($str3img); ?>
<br><br>
<img src="<?php echo $str3img; ?>"
alt="<?php echo $str3img; ?>"
title="<?php echo $str3img; ?>">
<?php
$img4 = new imagick(PATH2IMGW . '/gif/E 01 01.gif');
$str4img = 'img/results/E 01 01t494.gif';
// Run this exercise several times
$c1 = mt_rand(0, 255);
$c2 = mt_rand(0, 255);
$c3 = mt_rand(0, 255);
echo "rgb($c1, $c2, $c3)<br><br>";
$img4->setImageBackgroundColor("rgb($c1, $c2, $c3)");
$img4->thumbnailImage(300, 300, true);
$str4 = $img4->getImageBlob();
$img = imagecreatefromstring($str4);
imagegif($img, $str4img);
echo basename($str4img); ?>
<br><br>
<img src="<?php echo $str4img; ?>"
alt="<?php echo $str4img; ?>"
title="<?php echo $str4img; ?>">