<?php
bool public Imagick::autoLevelImage(int $channel = Imagick::CHANNEL_DEFAULT);
?>
AVAILABLE "imagick" CHANNEL STUDIED IN THIS TUTORIAL 1690 - ImageMagick 6.9.10-6 | ||
CHANNEL | ||
CONSTANT | VALUE | ABOUT |
imagick::CHANNEL_UNDEFINED | 0 | |
imagick::CHANNEL_RED | 1 | |
imagick::CHANNEL_GRAY | 1 | |
imagick::CHANNEL_CYAN | 1 | |
imagick::CHANNEL_GREEN | 2 | |
imagick::CHANNEL_MAGENTA | 2 | |
imagick::CHANNEL_BLUE | 4 | |
imagick::CHANNEL_YELLOW | 4 | |
imagick::CHANNEL_ALPHA | 8 | |
imagick::CHANNEL_OPACITY | 8 | |
imagick::CHANNEL_MATTE | 8 | |
imagick::CHANNEL_BLACK | 32 | |
imagick::CHANNEL_INDEX | 32 | |
imagick::CHANNEL_ALL | 134217727 | |
imagick::CHANNEL_DEFAULT | 134217719 | |
ed48 |
<?php
// Run several times
$imagePath = 'img/gif/E 01 01.gif';
$str1img = 'img/results/autoL611.gif';
$image1 = new Imagick(realpath($imagePath));
$image1->autoLevelImage(Imagick::CHANNEL_DEFAULT);
$image1->setimageFormat('gif');
$image1 = $image1->getimageBlob();
$img = imagecreatefromstring($image1);
imagegif($img, $str1img);
echo basename($str1img); ?>
<br><br>
<img src="<?php echo $str1img; ?>"
alt="<?php echo $str1img; ?>"
title="<?php echo $str1img; ?>">
<?php
// Run several times
$imagePath = 'img/jpg/wizardn.jpg';
$str2img = 'img/results/autoL612.jpg';
$image2 = new Imagick(realpath($imagePath));
$image2->autoLevelImage(Imagick::CHANNEL_DEFAULT);
$image2->setimageFormat('jpg');
$image2 = $image2->getimageBlob();
$img = imagecreatefromstring($image2);
imagejpg($img, $str2img);
echo basename($str2img); ?>
<br><br>
<img src="<?php echo $str2img; ?>"
alt="<?php echo $str2img; ?>"
title="<?php echo $str2img; ?>">
<?php
// Run several times
$imagePath = 'img/png/E 01 01.png';
$str3img = 'img/results/autoL613.png';
$image3 = new Imagick(realpath($imagePath));
$image3->autoLevelImage(Imagick::CHANNEL_DEFAULT);
$image3->setimageFormat('png');
$image3 = $image3->getimageBlob();
$img = imagecreatefromstring($image3);
imagepng($img, $str3img);
echo basename($str3img); ?>
<br><br>
<img src="<?php echo $str3img; ?>"
alt="<?php echo $str3img; ?>"
title="<?php echo $str3img; ?>">