����JFIF��x�x����'
Server IP : 78.140.185.180 / Your IP : 3.137.136.226 Web Server : LiteSpeed System : Linux cpanel13.v.fozzy.com 4.18.0-513.11.1.lve.el8.x86_64 #1 SMP Thu Jan 18 16:21:02 UTC 2024 x86_64 User : builderbox ( 1072) PHP Version : 7.3.33 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /opt/cpanel/ea-php74/root/usr/share/tests/pecl/imagick/tests/ |
Upload File : |
--TEST-- Test PHP bug #59378 writing to php://memory is incomplete --SKIPIF-- <?php require_once(dirname(__FILE__) . '/skipif.inc'); ?> <?php if (substr(PHP_OS, 0, 3) == 'WIN') { die("skip php://memory can't be used as filehandle on Windows"); } ?> --FILE-- <?php $imagick = new Imagick(); $imagick->newPseudoImage(640, 480, "LOGO:"); $imagick->setFormat("png"); $fp = fopen("php://memory", 'r+'); $imagick->writeImageFile($fp); rewind($fp); $memoryBlob = stream_get_contents($fp); fclose($fp); //This test depends on getImageBlob working correctly. $imageBlob = $imagick->getImageBlob(); //Read the images from the data blobs. $imageReopened = new Imagick(); $imageReopened->readImageBlob($imageBlob); $memoryReopened = new Imagick(); $memoryReopened->readImageBlob($memoryBlob); //Compare to see if they are identical. $result = $imageReopened->compareImages($memoryReopened, \Imagick::METRIC_MEANABSOLUTEERROR); if ($result[1] == 0) { echo "Reopened images are identical."; } else { echo "Error, reopened images have changed."; var_dump($result); } ?> --EXPECTF-- Reopened images are identical.