add imagick

This commit is contained in:
3x0k1d 2025-05-05 08:18:25 +03:00
parent f5114399cb
commit 77a8025b7f
3 changed files with 45 additions and 2 deletions

View File

@ -3,7 +3,7 @@ include("baseModule.php");
$checker = new BaseModule(
"igbinary",
"Module name: 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.",
"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.",
"Original text: test test ");
$checker->printInfo();

42
checkers/php-imagick.php Normal file
View File

@ -0,0 +1,42 @@
<?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();
function imageTricks($pathToImage) {
$im = new Imagick("test.png");
$im->thumbnailImage(200, null);
$im->borderImage(new ImagickPixel("white"), 5, 5);
$reflection = $im->clone();
$reflection->flipImage();
$gradient = new Imagick();
$gradient->newPseudoImage($reflection->getImageWidth() + 10, $reflection->getImageHeight() + 10, "gradient:transparent-black");
$reflection->compositeImage($gradient, imagick::COMPOSITE_OVER, 0, 0);
$reflection->setImageOpacity( 0.3 );
$canvas = new Imagick();
$width = $im->getImageWidth() + 40;
$height = ($im->getImageHeight() * 2) + 30;
$canvas->newImage($width, $height, new ImagickPixel("black"));
$canvas->setImageFormat("png");
$canvas->compositeImage($im, imagick::COMPOSITE_OVER, 20, 10);
$canvas->compositeImage($reflection, imagick::COMPOSITE_OVER, 20, $im->getImageHeight() + 10);
header("Content-Type: image/png");
echo $canvas;
}
imageTricks("/home/u525748/php84test.ff14wiki.ru/www/styles/bebs.png");

View File

@ -1,2 +1,3 @@
<?php
phpinfo();
echo "close";
#phpinfo();