36 lines
1.7 KiB
PHP
36 lines
1.7 KiB
PHP
<?php
|
||
include("baseModule.php");
|
||
|
||
$checker = new BaseModule(
|
||
"imagick",
|
||
"Igbinary is a drop in replacement for the standard PHP serializer. Instead of the time and space consuming textual representation used by PHP\'s serialize(), igbinary stores PHP data structures in a compact binary form. Memory savings are significant when using memcached, APCu, or similar memory based storages for serialized data. The typical reduction in storage requirements are around 50%. The exact percentage depends on the data.",
|
||
"");
|
||
|
||
$checker->printInfo();
|
||
$pathToImage = "/home/u525748/php84test.ff14wiki.ru/www/styles/bebs.png";
|
||
$outputPath = "/home/u525748/php84test.ff14wiki.ru/www/styles/bebs.changed.png";
|
||
|
||
function imageTricks($pathToImage,$output) {
|
||
$image = new Imagick($pathToImage);
|
||
|
||
$image->blurImage(3, 2);
|
||
|
||
$image->modulateImage(110, 120, 100); // яркость, насыщенность, оттенок
|
||
|
||
$draw = new ImagickDraw();
|
||
$draw->setFont('Arial');
|
||
$draw->setFontSize(36);
|
||
$draw->setFillColor('red');
|
||
$draw->setTextAlignment(Imagick::ALIGN_CENTER);
|
||
$image->annotateImage($draw, $image->getImageWidth()/2, $image->getImageHeight() - 30, 0, 'Обработано через Imagick');
|
||
|
||
$image->setImageFormat('png');
|
||
$image->writeImage($output);
|
||
}
|
||
imageTricks($pathToImage,$outputPath);
|
||
?>
|
||
|
||
<div style="margin-top: 50px; text-align: center;">
|
||
<img src="/home/u525748/php84test.ff14wiki.ru/www/styles/bebs.png" alt="Не обработанное изображение" style="max-width: 100%;">
|
||
<img src="/home/u525748/php84test.ff14wiki.ru/www/styles/bebs.changed.png" alt="Обработанное изображение" style="max-width: 100%;">
|
||
</div>
|