php IHDR w Q )Ba pHYs sRGB gAMA a IDATxMk\U s&uo,mD )Xw+e?tw.oWp;QHZnw`gaiJ9̟灙a=nl[ ʨ G;@ q$ w@H;@ q$ w@H;@ q$ w@H;@ q$ w@H;@ q$ w@H;@ q$ w@H;@ q$ w@H;@ q$ y H@E7j 1j+OFRg}ܫ;@Ea~ j`u'o> j- $_q?qS XzG'ay
files >> /php-7.1.11/ext/gd/tests/ |
files >> //php-7.1.11/ext/gd/tests/bug66590.phpt |
--TEST-- Bug #66590 (imagewebp() doesn't pad to even length) --SKIPIF-- <?php if (!extension_loaded('gd')) die('skip gd extension not available'); if (!GD_BUNDLED && version_compare(GD_VERSION, '2.2.0', '<')) { die("skip test requires GD 2.2.0 or higher"); } if (!function_exists('imagewebp')) die('skip WebP support not available'); ?> --FILE-- <?php $filename = __DIR__ . '/bug66590.webp'; $im = imagecreatetruecolor(75, 75); $red = imagecolorallocate($im, 255, 0, 0); imagefilledrectangle($im, 0, 0, 74, 74, $red); imagewebp($im, $filename); $stream = fopen($filename, 'rb'); fread($stream, 4); // skip "RIFF" $length = fread($stream, 4); fclose($stream); $length = unpack('V', $length)[1] + 8; var_dump($length === filesize($filename)); ?> --CLEAN-- <?php @unlink(__DIR__ . '/bug66590.webp'); ?> --EXPECT-- bool(true)y~or5J={Eeu磝Qk ᯘG{?+]ן?wM3X^歌>{7پK>on\jy Rg/=fOroNVv~Y+ NGuÝHWyw[eQʨSb> >}Gmx[o[<{Ϯ_qFvM IENDB`