⚝
One Hat Cyber Team
⚝
Your IP:
216.73.216.19
Server IP:
178.33.27.10
Server:
Linux cpanel.dev-unit.com 3.10.0-1160.108.1.el7.x86_64 #1 SMP Thu Jan 25 16:17:31 UTC 2024 x86_64
Server Software:
Apache/2.4.57 (Unix) OpenSSL/1.0.2k-fips
PHP Version:
8.2.11
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
proc
/
self
/
root
/
usr
/
local
/
src
/
imagick
/
tests
/
View File Name :
056_Imagick_distortImage_Perspective.phpt
--TEST-- Test Imagick, distortImage --SKIPIF-- <?php $imageMagickRequiredVersion=0x675; require_once(dirname(__FILE__) . '/skipif.inc'); checkFormatPresent('png'); ?> --FILE-- <?php $distortion = 1; //$imagick = new \Imagick(realpath($this->rsiControl->getImagePath())); $imagick = new \Imagick(); /* Create new checkerboard pattern */ $imagick->newPseudoImage(100, 100, "pattern:checkerboard"); /* Set the image format to png */ $imagick->setImageFormat('png'); /* Fill new visible areas with transparent */ $imagick->setImageVirtualPixelMethod(\Imagick::VIRTUALPIXELMETHOD_TRANSPARENT); /* Activate matte */ $imagick->setImageMatte(true); /* Control points for the distortion */ $controlPoints = array( 10, 10, 10, 5, 10, $imagick->getImageHeight() - 20, 10, $imagick->getImageHeight() - 5, $imagick->getImageWidth() - 10, 10, $imagick->getImageWidth() - 10, 20, $imagick->getImageWidth() - 10, $imagick->getImageHeight() - 10, $imagick->getImageWidth() - 10, $imagick->getImageHeight() - 30); /* Perform the distortion */ $imagick->distortImage(\Imagick::DISTORTION_PERSPECTIVE, $controlPoints, true); $bytes = $imagick->getImageBlob(); if (strlen($bytes) <= 0) { echo "Failed to generate image.";} echo "Ok"; ?> --EXPECTF-- Ok