35 lines
1.4 KiB
PHP
35 lines
1.4 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,$outputPath) {
|
||
$image = new Imagick($pathToImage);
|
||
|
||
$image->blurImage(3, 2);
|
||
$image->modulateImage(110, 120, 100);
|
||
$image->setImageFormat('png');
|
||
|
||
if (!$image->writeImage($outputPath)) {
|
||
die('Error');
|
||
}
|
||
|
||
$image->destroy();
|
||
}
|
||
if (!file_exists($outputPath)) {
|
||
imageTricks($pathToImage,$outputPath);
|
||
}
|
||
?>
|
||
<html>
|
||
<div style="margin-top: 50px; text-align: center;">
|
||
<img src="/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>
|
||
</html>
|